flipboxstudio / lumen-generator

A Lumen Generator You Are Missing
https://packagist.org/packages/flipbox/lumen-generator
MIT License
824 stars 126 forks source link

Requests generated incorrectly #106

Closed stefkes closed 3 years ago

stefkes commented 3 years ago

When generating a request with php artisan make:request MyRequest you end up with a class that has


protected function authorize()
{
    return true;
}

protected function rules()
{
    return [
        //
    ];
}

But this gives Fatal error: Declaration of App\Http\Requests\MyRequest::authorize() must be compatible with Anik\Form\FormRequest::authorize(): bool

The generated class should contain


protected function authorize(): bool
{
    return true;
}

protected function rules(): array
{
    return [
        //
    ];
}
jorgemudry commented 3 years ago

@stefkes it should be fixed now. update your package version please. sorry for the inconvenience and thank you for the report 👍

stefkes commented 3 years ago

My pleasure, thanks for the fix and your response.