定制 hungnguyenba/apidriver 二次开发

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

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

hungnguyenba/apidriver

Composer 安装命令:

composer require hungnguyenba/apidriver

包简介

A Api based Eloquent model and Query builder for laravel (Api Eloquent)

README 文档

README

This package was only used in my personal projects with special use cases, so you shouldn't use it. I will rewrite it for common use cases when i have rest time. Thank you!

API Driver For Laravel 5.2

An Eloquent model and Query builder with support for Restful Api Server, using the original Laravel API. This library extends the original Laravel classes, so it uses exactly the same methods.

Installation

Installation using composer:

composer require hungnguyenba/apidriver

And add the service provider in config/app.php:

Hungnguyenba\Apidriver\DatabaseServiceProvider::class

Configuration

Change your default database connection name in config/database.php:

'default' => 'api'

And add a new api server connection:

'api' => [
        'driver' => 'api',
        'host' => 'localhost/v1/',
        'database' => '',
        'prefix' => '',
]

Usage

Create new Model extend Api Eloquent Model:

use Hungnguyenba\Apidriver\Model\Model;

class User extends Model
{

}

Using the original Eloquent API:

$users = User::where('id', '<', 100)->take(3)->get();
$user = User::find(3);
$user->delete();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-01-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固