make:middleware

Create a new HTTP middleware class

Options

  • pest - Generate an accompanying Pest test for the Middleware Optional
  • phpunit - Generate an accompanying PHPUnit test for the Middleware Optional
  • test - Generate an accompanying Test test for the Middleware Optional

Arguments

  • name - The name of the middleware Required
php artisan make:middleware [--test] [--pest] [--phpunit] [--] <name>