barryvdh/laravel-debugbar

1. Download the Composer package

composer require barryvdh/laravel-debugbar
Copy the code

2. Configure injection

  1. Add Barryvdh\Debugbar\ServiceProvider::class to providers property in config/app.php

  2. 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 Facades
  • php artisan ide-helper:models– Generate annotations for the data model
  • php 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

  1. In the app. The configprovidersAttribute to add
Mews \ Captcha \ CaptchaServiceProvider: : class,Copy the code
  1. Run the named build configuration fileconfig/captcha.php
php artisan vendor:publish
Copy the code
  1. 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 imagescaptcha();orCaptcha::create();
  • To generate the urlcaptcha_src();orCaptcha::src();
  • Generate HTMLcaptcha_img();orCaptcha::img();
  • Switching configuration Filescaptcha_img('flat');orCaptcha::img('inverse');

Check way

$rules = ['captcha'= >'required|captcha'];
Copy the code