laravel-ide-helper
作用
实现自动完成、代码跟踪的支持
安装
composer require barryvdh/laravel-ide-helper
然后在config/app.php的providers中添加
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
然后执行以下命令:
php artisan clear-compiled
php artisan ide-helper:generate
php artisan optimize
查看项目根目录是否生成了_ide_helper.php,生成 了表面此时支持代码补全功能了。
laravel-debugbar
作用
在页面下方展示Debug框(开启Debug模式)
安装
composer require barryvdh/laravel-debugbar
Laravel Setting
安装
composer require anlutro/l4-settings
- Add
anlutro\LaravelSettings\ServiceProvider
to the array of providers inconfig/app.php
. - Publish the config file by running
php artisan config:publish anlutro/l4-settings
(Laravel 4.x) orphp artisan vendor:publish
(Laravel 5.x). The config file will give you control over which storage engine to use as well as some storage-specific settings. - Optional: add
'Setting' => 'anlutro\LaravelSettings\Facade'
to the array of aliases inconfig/app.php
.
使用
You can either access the setting store via its facade or inject it by type-hinting towards the abstract class anlutro\LaravelSettings\SettingStore
.
<?php Setting::set('foo', 'bar'); Setting::get('foo', 'default value'); Setting::get('nested.element'); Setting::forget('foo'); $settings = Setting::all(); ?>
Call Setting::save()
explicitly to save changes made.