You have a return
statement at the top of the function block. You need to remove that. As far as I know, you should not use return view
statement for controller action used for processing POST request.
As @bharath said you are returning a view before processing the actual functionality of the controller
return view('dashboard/add-article',
['categories' => $this->categories()]
);
Trying removing this statement and see if your code works as expected.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community