barryvdh/laravel-debugbar
1. Download the Composer package
composer require barryvdh/laravel-debugbar
Copy the code
2. Configure injection
-
Add Barryvdh\Debugbar\ServiceProvider::class to providers property in config/app.php
-
Add ‘Debugbar’ to aliases property in config/app.php => Barryvdh\Debugbar\Facade::class,
Release 3.
php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider"
Copy the code
barryvdh/laravel-ide-helper
1. Download the plug-in package
composer require barryvdh/laravel-ide-helper
Copy the code
2. Injection
Add providers in config/app.php
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
Copy the code
Use 3.
php artisan ide-helper:generate
– Generate comments for Facadesphp artisan ide-helper:models
– Generate annotations for the data modelphp artisan ide-helper:meta
– Generate PhpStorm Meta file
xethron/migrations-generator
Installing dependency packages
composer require xethron/migrations-generator
The configuration file
Providers => [] add two lines of code to ‘providers’ => [] in config/app.php
Way\Generators\GeneratorsServiceProvider::class,
Xethron\MigrationsGenerator\MigrationsGeneratorServiceProvider::class,
Copy the code
Run the command
php artisan migrate:generate
hieu-le/active
mews/captcha
download
composer require mews/captcha
Copy the code
configuration
- In the app. The config
providers
Attribute to add
Mews \ Captcha \ CaptchaServiceProvider: : class,Copy the code
- Run the named build configuration file
config/captcha.php
php artisan vendor:publish
Copy the code
- Configuration captcha. PHP
return [
'default'= > ['length'=> 4. // The length of the verification code'width'= > 120,'height'= > 36,'quality'= > 90,'bgImage'= >false// Background image'bgColor'= >'#e9ecef'// Background color'math'= >false, // use mathematical methods], //... ] ;Copy the code
use
- Generate images
captcha();
orCaptcha::create();
- To generate the url
captcha_src();
orCaptcha::src();
- Generate HTML
captcha_img();
orCaptcha::img();
- Switching configuration Files
captcha_img('flat');
orCaptcha::img('inverse');
Check way
$rules = ['captcha'= >'required|captcha'];
Copy the code