<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
use Illuminate\Support\Facades\Redirect;
//Route::group(['prefix' => 'web','middleware'=>['web'],'namespace'=>'Web'],function(){
//    #后台首页
//    Route::get('admin','IndexController@index');
//    #Route::resource('member','MemberController');
//
//});

Route::group(['prefix' => 'web','middleware'=>[],'namespace'=>'Web'],function(){
    #后台首页
    Route::any('login','LoginController@login');
    Route::any('logout','LoginController@logout');

});

#根目录跳转
Route::get('/', function () {
    $user = \Illuminate\Support\Facades\Auth::user();

    if (empty($user)){
        return Redirect::to('web/login');
    }
    return Redirect::to("/web/admin");

});
Route::get('/web', function () {
    return Redirect::to('web/login');
});


//Auth::routes();

#Route::get('/home', 'HomeController@index')->name('home');
