[英]how can manage laravel 5 login page after the logging?
我已经使用make:auth命令创建了laravel 5登录和注册表单。 但我的布局文件夹中同时包含home.blade.php和front.blade.php。 我的问题是,当我以“我的索引”页面(网站的打开页面)访问“我的网络”应用程序时,我需要front.blade.php文件。 然后在使用系统登录时需要home.blade.php文件。 (做cms工程)。 我的目标位置是routes.php
这是routes.php
Route::auth();
Route::get('/', function () {
return view('front');
});
Route::get('/home', function () {
return view('home');
});
Route::get('/about',function(){
return view('about');
});
Route::get('/bod',function(){
return view('bod');
});
Route::get('/st',function(){
return view('st');
});
Route::get('/services',function(){
return view('services');
});
Route::get('/contact',function(){
return view('contact');
});
Route::get('/welcome',function(){
return view('welcome');
});
Route::auth();
Route::get('/home', 'HomeController@index');
但是,当我使用上述路由时,在使用系统登录后,我的Web应用程序始终重定向到front.blade.php文件。 系统登录后,我需要使用home.blade.php进行重定向。
您可以在前面的路线内添加支票,如果用户已登录,则可以重定向到首页。
if (Auth::check()) {
return redirect('home');
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.