Support the ongoing development of Laravel.io →
Blade Validation
Last updated by @ajax30 2 years ago.
0

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.

Last updated by @bharath 2 years ago.
0

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.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Razvan ajax30 Joined 2 Oct 2021

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.