logo

Request

You can generate a request by following command.

bash
php artisan better:request StoreBlog Blog

INFO

Generated request will be at app/Domains/Blog/Requests/StoreBlogRequest.php

Arguments

  • request : name of the generated request file
  • domain : name of the domain where the request file will be generated

Options

  • --force : the command will fail if there is existing file with the given path and name, this option will delete the existing file and replace with new generated file
  • See more at

Request

php
use Laranex\BetterLaravel\Cores\Request;

class StoreBlogRequest extends Request
{
    public function authorize(): bool
    {
        return false;
    }

    public function rules(): array
    {
        // here is your validation rules
    }
}