<?php


Route::group(['domain'=>env('CP_DOMAIN'),'namespace'=>'App\Http\Controllers\Cp\Manage'],function () {
    //需要判断授权
    Route::group(['middleware'=>'CpAuth'],function (){
        Route::get('manage/cplist','ManageController@cplist');
        Route::post('manage/createCp','ManageController@createCp');
        Route::get('manage/cplistJson','ManageController@cplistJson');
    });
});

//web 
Route::group(['domain'=>env('CP_DOMAIN'),'namespace'=>'App\Http\Controllers\Cp\Web'],function () {
        Route::get('logout','WelcomeController@logout');
        Route::get('login','WelcomeController@login');
                
        Route::get('get_session','WelcomeController@get_session');
        //需要判断授权
        Route::group(['middleware'=>'CpAuth'],function (){
        	Route::any('{slug}','WelcomeController@index')->where('slug', '(.*)?');
        });
});