am2studio/laravel-finite
Composer 安装命令:
composer require am2studio/laravel-finite
包简介
Service provider for finite
关键字:
README 文档
README
Install
Via Composer
$ composer require AM2studio/Laravel-Finite
in config/app.php
under 'providers' add
AM2Studio\LaravelFinite\LaravelFiniteServiceProvider::class,
under 'alias' add
'Finite' => AM2Studio\LaravelFinite\FiniteFacade::class,
publish migration files and run migration
php artisan vendor:publish --provider="AM2Studio\LaravelFinite\LaravelFiniteServiceProvider" --tag="migrations" php artisan migrate
Usage
In models you want to use it add namespace
use AM2Studio\LaravelFinite\Traits\LaravelFiniteTrait;
and then use trait
use LaravelFiniteTrait;
Finite::can($eloquentModelObject, 'finite transition'); Finite::apply($eloquentModelObject, 'finite transition'); Finite::getName($eloquentModelObject));
It is recommended that you use Relation::morphTo([]) because that way if you change the namespace of your model the records in DB won't break.
Change log
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 5.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-01-21