How exactly are you calling this endpoint? Do you have @csrf in your <form> or X-CSRF-TOKEN in your request header?
Jan 22, 2021
6
Level 3
getting a 403 error when trying to store data
I'm making a blog, and I have a textarea field with summernote JS, and it has an option to upload images.
as far as I can see, when you press the view code option of the summernotjs editor, you can see it's all HTML and when I submit, the request doesn't even reach the controller and gives a 403 error..
this is the code of the controller where it's suppose to reach:
public function store(Request $request, Slug $slug) {
dd('asd'); // doesn't show this.
$this->authorize('add-posts'); //authorize create new post
....///more code
}
routes:
Route::resource('posts', 'PostController');
where am I getting stopped out?
Please or to participate in this conversation.