larapost/categories
Composer 安装命令:
composer require larapost/categories
包简介
Content categories system
README 文档
README
Install via composer
Add orm to composer.json configuration file.
$ composer require larapost/categories
add to file config/app.php
If you are using laravel version before 5.5 you must add our service provider.
'providers' => [ ... Larapost\Categorie\Support\ServiceProvider::class, ],
Migrate
you can use migrate
$ php artisan migrate
OR
$ php artisan migrate:fresh
Use
use Larapost\Categories;
functions
Add
function(Categories $categories) { return $categories->add('<name>', '<slug>' = false); }
Update
function(Categories $categories) { return $categories->update('<id>', '<name>', '<slug>' = false); }
Get
function(Categories $categories) { return $categories->get('<column>', '<value>', <subs> = true | false); }
Remove
function(Categories $categories) { return $categories->remove('<id>'); }
All
function(Categories $categories) { return $categories->all(); }
Sub categorie
Sub Add
function(Categories $categories) { return $categories->subAdd('<categorie_id>', '<name>', '<slug>' = false); }
Sub Update
function(Categories $categories) { return $categories->subUpdate('<id>', '<name>', '<slug>' = false); }
Sub Get
function(Categories $categories) { return $categories->subGet('<categorie_id>', '<column>', '<value>'); }
Sub Remove
function(Categories $categories) { return $categories->subRemove('<id>'); }
sub All
function(Categories $categories) { return $categories->subAll(); }
统计信息
- 总下载量: 69
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2018-11-23