web.php 2.38 KB
<?php

/**
 * Global Routes
 * Routes that are used between both frontend and backend.
 */

// Switch between the included languages
Route::get('lang/{lang}', 'LanguageController@swap');

/* ----------------------------------------------------------------------- */

/*
 * Frontend Routes
 * Namespaces indicate folder structure
 */
Route::group(['namespace' => 'Frontend', 'as' => 'frontend.'], function () {
    includeRouteFiles(__DIR__.'/Frontend/');
});

/* ----------------------------------------------------------------------- */

/*
 * Backend Routes
 * Namespaces indicate folder structure
 */
Route::group(['namespace' => 'Backend', 'prefix' => 'admin', 'as' => 'admin.', 'middleware' => 'admin'], function () {
    /*
     * These routes need view-backend permission
     * (good if you want to allow more than one group in the backend,
     * then limit the backend features by different roles or permissions)
     *
     * Note: Administrator has all permissions so you do not have to specify the administrator role everywhere.
     */
    includeRouteFiles(__DIR__.'/Backend/');
});

Route::group(['namespace' => 'Backend', 'prefix' => 'admin', 'as' => 'admin.', 'middleware' => 'admin'], function () {
    /*
     * These routes need view-backend permission
     * (good if you want to allow more than one group in the backend,
     * then limit the backend features by different roles or permissions)
     *
     * Note: Administrator has all permissions so you do not have to specify the administrator role everywhere.
     */
    includeRouteFiles(__DIR__.'/Backend/');
});

Route::get('tool/tool', 'Tool\ToolController@showTool');
Route::post('tool/dotool', 'Tool\ToolController@doTool');
//Route::get('lzc/doRedPack', 'Backend\Lzc\LzcController@doRedPack');//getAvailableFullDiscountCoupon
//Route::get('lzc/getAvailableFullDiscountCoupon', 'Backend\Lzc\LzcController@getAvailableFullDiscountCoupon');//getAvailableFullDiscountCoupon
//Route::get('lzc/availablePowerNumber', 'Backend\Lzc\LzcController@availablePowerNumber');//availablePowerNumber

Route::get('coupon/getMpCode', 'Backend\WxGuide\WxGuideController@getMpCode');//小程序 获取新版公众号 openID
Route::get('coupon/getUserInfo', 'Backend\WxGuide\WxGuideController@getUserInfo');

//Route::get('lzc/monthly', 'Backend\Lzc\LzcController@monthLy');
//Route::post('tool/dotool', function (){
//    return json_encode(['msg'=>'22222']);
//});