Support the ongoing development of Laravel.io →
Requests Views Forms
Last updated 1 year ago.
0
moderator Solution

You need to give your route a name. '/benice' is only the url segment. See here how to name routes: https://laravel.com/docs/5.2/routing#named-routes

0

i am wiring code it will be work

Route::post('/benice', function(\Illuminate\Http\Request $request) { if(isset($request['action']) && $request['name']) { if (strlen($request['name']) > 0) { return view('actions.nice', ['action' => $request['action'], 'name' => $request['name']]); } return redirect()->back(); } return redirect()->back(); })->name('benice');

0

the route in web.php should be :

Route::post('/benice', function(\Illuminate\Http\Request $request) {

if (isset($request['action']) && $request['name']) {
	if(strlen($request['name']) > 0) {
	   return view('actions.nice', ['action'=>$request['action'], 'name'=>$request['name']]);
	}
	return redirect()->back();
}

return redirect()->back();

})->name('benice');

Last updated 6 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

samantaba samantaba Joined 26 Jul 2016

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.