定制 jsonrai277/laravel-json-placeholder 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jsonrai277/laravel-json-placeholder

最新稳定版本:1.0.1

Composer 安装命令:

composer require jsonrai277/laravel-json-placeholder

包简介

A json placeholder integration for laravel

README 文档

README

A package that integrates Typicode Json placeholder with laravel. It creates a landing, listing and view pages for all the available resources posts, comments, albums, photos, todos, users.

Installation

Require the package.

composer require jsonrai277/laravel-json-placeholder

Publish necessary configs and views for customization. It copies the config to config/laravel-json-placeholder in laravel app and also the views to resources/views/vendor/laravel-json-placeholder directory.

php artisan vendor:publish --provider=JsonRai277\\LaravelJsonPlaceholder\\LaravelJsonPlaceholderServiceProvider

Once tag published visit the route /resources. It should render a nice landing page for all the available resources. Also, the config should be pretty self explanatory to override any settings.

Config

Retrieving config.

$config = config('laravel-json-placeholder.pagination_size'); // Returns 10 or whatever set on the config.
// Or
$config = JsonRai277\LaravelJsonPlaceholder\LaravelJsonPlaceholderConfig::getConfig('pagination_size');

Setting config at rung time.

JsonRai277\LaravelJsonPlaceholder\LaravelJsonPlaceholderConfig::setConfig('pagination_size', 10); // Sets 10.

Testing

You can run tests with:

vendor/bin/phpunit

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-21