Closed xentie closed 7 years ago
As per the documentation, you must edit the authorize() to return a true value. If your using laravel’s authentication system, you could pass the —with-auth option to only allow the store/update request for the authenticated users. Have a look at the documentation for the —with-form-request https://crestapps.com/laravel-code-generator/docs/2.1
To use Laravel authentication system follow this document https://laravel.com/docs/5.5/authentication
ah, you beat me to it:
just read this on documentation:
By default, the method authorize() is set to return false for your application's security. This method must be modified to return a true value for the store and update requests to be allowed. Otherwise, the request will be Forbidden When using --with-auth option, the authorize() method return Auth::check() which should always return true at this point.
Thank you so much
Environment:
Description:
I did a Fresh Install of laravel, then ran:
composer require crestapps/laravel-code-generator --dev
andcomposer update
Steps/Commands To Reproduce:
I ran: 'php artisan fields-file:create Port --names="name,updatedby,status"' 'php artisan create:resources Port --with-form-request --models-per-page=15'
Content Of The Fields-File:
I tried with and without an imported data, got the same results on saving/updating data
hitting this error:
Symfony \ Component \ HttpKernel \ Exception \ AccessDeniedHttpException This action is unauthorized.