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
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');
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');
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community