jason-guru/laravel-make-repository
最新稳定版本:0.0.3
Composer 安装命令:
composer require jason-guru/laravel-make-repository
包简介
A simple package to create a make:repository command for Laravel 5+
README 文档
README
Laravel PHP Artisan Make:Repository
A simple package for addding php artisan make:repository command to Laravel 5 and above
Installation
Require the package with composer using the following command:
composer require jason-guru/laravel-make-repository --dev
Or add the following to your composer.json's require-dev section and composer update
"require-dev": { "jason-guru/laravel-make-repository": "^0.0.2" }
Usage
php artisan make:repository your-repository-name
Example:
php artisan make:repository UserRepository
or
php artisan make:repository Backend\UserRepository
The above will create a repositories directory inside the app directory.
Once the repository is generated add your model class and return it in the model function,
Example:
<?php
namespace DummyNamespace;
use JasonGuru\LaravelMakeRepository\Repository\BaseRepository;
//use Your Model
/**
* Class DummyClass.
*/
class DummyClass extends BaseRepository
{
/**
* @return string
* Return the model
*/
public function model()
{
//return YourModel::class
}
}
统计信息
- 总下载量: 284.89k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 64
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-28