Php 登录后如何管理laravel 5登录页面?

Php 登录后如何管理laravel 5登录页面?,php,laravel-5,Php,Laravel 5,我已经使用make:auth命令创建了Laravel5登录和注册表单。但是我的layouts文件夹中有home.blade.php和front.blade.php。我的问题是,当我访问我的web应用程序作为索引页(网站的打开页)时,我需要front.blade.php文件。然后,我需要home.blade.php文件来登录系统。(做cms工作)。我想目标位置是routes.php 这是routes.php Route::auth(); Route::get('/', function

我已经使用make:auth命令创建了Laravel5登录和注册表单。但是我的layouts文件夹中有home.blade.php和front.blade.php。我的问题是,当我访问我的web应用程序作为索引页(网站的打开页)时,我需要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重定向。

如果用户登录,您可以在前端路由中添加一个检查并重定向到home

if (Auth::check()) {
    return redirect('home');
}

使用此脚本成功路由::get('/',函数(){if(Auth::check()){return view('home');}return view('front');});