承接 larafun/suite 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

larafun/suite

Composer 安装命令:

composer require larafun/suite

包简介

A collection of classes and traits that will make you Laravel API workflow even more awesome!

README 文档

README

Build Status Docs Status Latest Stable Version License Total Downloads

A small collection of classes and traits that will make your Laravel API development even more awesome!

Check out the full documentation in here larafun-suite.readthedocs.io

Installation

Requires PHP > 7.0, Laravel > 5.5

composer require larafun/suite

Basic Usage

Just make your Models extend Larafun\Suite\Model instead of use Illuminate\Database\Eloquent\Model

<?php

namespace App\Models;

use Larafun\Suite\Model;

class Book extends Model
{

}

Now you can use your models as you regularly would.

Why use this package?

Because you get enhanced Resources and Pagination out of the box!

class BookController extends Controller
{
    // ...

    public function index()
    {
        return Book::where('author', 'Isaac Asimov')->skip(2)->take(5)->get();
    }

Since the Book is an instance of Larafun\Suite\Model the results will be automatically presented inside a data property. Additionally, a meta field will be included and provide pagination information out of the box.

Switch back to the default behaviour?

The most easy way is to make your models extend Illuminate\Database\Eloquent\Model.

Otherwise you can fine tune your setup inside config/suite.php, after you publish it:

php artisan vendor:publish --provider=Larafun\\Suite\\ServiceProvider

TODO

These things should be added:

  • Add Validation to Filters
  • Add Formatters to Filters
  • Add Sanitizers to Filters
  • Change Filters behaviour to allow keys that do not have any defined defaults
  • Allow Filters to override values after instatiation
  • Split Filters into a separate package

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固