<commit_before><?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
*/

Route::auth();

// 控制台
Route::get('/', 'Admin\HomeController@index');

Route::group(['prefix' => 'admin','middleware'=>'auth','namespace'=>'Admin'],function(){
    // 公众号管理
    Route::group(['prefix'=>'wechat'],function (){
        Route::resource('info', 'WechatInfoController', ['except' => ['create', 'edit']]);
        Route::resource('menu', 'WechatMenuController');
        Route::post('pushMenu','WechatMenuController@pushMenu');
        Route::resource('follow', 'WechatFollowController', ['except' => ['create']]);
    });
});

// DEBUG
Route::get('/wechat/debug','WechatController@debug');

Route::any('/wechat', 'WechatController@serve');

// 微信商城首页
Route::group(['prefix'=>'mall','middleware' => ['web', 'wechat.oauth'],'namespace'=>'Mall'],function(){
    Route::get('/','MallController@index');
    Route::get('/user', function () {
        session('wechat.oauth_user'); // 拿到授权用户资料
    });
});

//Route::group(['middleware' => ['web', 'wechat.oauth']], function () {
//    Route::get('/user', function () {
//        session('wechat.oauth_user'); // 拿到授权用户资料
//    });
//});
<commit_msg>微信 OAuth2.0 授权<commit_after><?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
*/

Route::auth();

// 控制台
Route::get('/', 'Admin\HomeController@index');

Route::group(['prefix' => 'admin','middleware'=>'auth','namespace'=>'Admin'],function(){
    // 公众号管理
    Route::group(['prefix'=>'wechat'],function (){
        Route::resource('info', 'WechatInfoController', ['except' => ['create', 'edit']]);
        Route::resource('menu', 'WechatMenuController');
        Route::post('pushMenu','WechatMenuController@pushMenu');
        Route::resource('follow', 'WechatFollowController', ['except' => ['create']]);
    });
});

// DEBUG
Route::get('/wechat/debug','WechatController@debug');

Route::any('/wechat', 'WechatController@serve');

// 微信商城首页
Route::group(['prefix'=>'mall','middleware' => ['web', 'wechat.oauth'],'namespace'=>'Mall'],function(){
    Route::get('/','IndexController@index');
    Route::get('/user', function () {
        session('wechat.oauth_user'); // 拿到授权用户资料
    });
});

//Route::group(['middleware' => ['web', 'wechat.oauth']], function () {
//    Route::get('/user', function () {
//        session('wechat.oauth_user'); // 拿到授权用户资料
//    });
//});

{'fraction_non_alphanumeric': 0.3475095785440613, 'fraction_numerical': 0.0007662835249042146, 'mean_word_length': 2.7622478386167146, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '466660', 'n_tokens_mistral': 765, 'n_tokens_neox': 811, 'n_words': 90}