我正在使用laravel 5.5开展一个项目。在检查用户身份验证后,我正在尝试重定向到return
语句的视图。
有什么区别:
return redirect()->intended(route('abcd'));
return view('abcd');
return redirect()->intended(route('abcd'));
创建具有名称的路由,例如test是name
Route::get('/abcd','MainController@show')->name('test');
这将在MainController中运行show function
return view('abcd');
这将打开页面abcd.blade.php