samrat131/laravel-options-table
Composer 安装命令:
composer require samrat131/laravel-options-table
包简介
Add delete retrive settings/options to laravel application
README 文档
README
This package allow to add delete retrive options value in laravel applications.
Installation
To use laravel-options-table in your project, please use Composer to add the package to your laravel applications
composer require samrat131/laravel-options-table
Edit config/app.php file and add following lines (only for laravel version below 5.5)
'providers' => [
...
Samrat131\LaravelOptionsTable\OptionServiceProvider::class,
]
'aliases' => [
...
'Option' => Samrat131\LaravelOptionsTable\OptionFacade::class,
]
Vendor Publish & Migrate
Run this command in terminal php artisan vendor:publish --tag="migrations" to publish migration file of this package.
After that run php artisan migrate to migrate the table. This will create options table in your database.
Usage
Add value
Option::set('key', 'value');
Retrive value
Option::get('key');
Delete value
Option::drop('key');
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-08-25