@bwrigley Can you post your web.php routes file?
Jan 2, 2019
15
Level 5
403 when using Resource Controller
Hi There,
I've set up a new Resource Controller but as soon as I try to submit a form with the PUT or PATCH method I get a 403 error.
The syntax I have at the top of my form is:
<form method="POST" action="{{ route('admin.administrators.update',['admin' => $admin->id]) }}">
{{ csrf_field() }}
@method('PUT')
///
From what I've read this might be an issue with my configuration of nginx?
However this is what comes out of the box with Homestead.
Anyone brilliant who can tell me how to fix this?
Level 5
Walk of shame time...
I'm using a custom form request to validate the input data. I think I missed this bit:
class CreateAdminFormRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return false;
}
huge apologies to all and thank you all for your time!
2 likes
Please or to participate in this conversation.