当前位置: 首页>>代码示例>>PHP>>正文


PHP route::group方法代码示例

本文整理汇总了PHP中route::group方法的典型用法代码示例。如果您正苦于以下问题:PHP route::group方法的具体用法?PHP route::group怎么用?PHP route::group使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在route的用法示例。


在下文中一共展示了route::group方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: function

    Route::post('clients/update/{id}', ['as' => 'clients.update', 'uses' => 'ClientsController@update']);
    Route::get('products', ['as' => 'products.index', 'uses' => 'ProductsController@index']);
    Route::get('products/create', ['as' => 'products.create', 'uses' => 'ProductsController@create']);
    Route::post('products/store', ['as' => 'products.store', 'uses' => 'ProductsController@store']);
    Route::get('products/edit/{id}', ['as' => 'products.edit', 'uses' => 'ProductsController@edit']);
    Route::get('products/destroy/{id}', ['as' => 'products.destroy', 'uses' => 'ProductsController@destroy']);
    Route::post('products/update/{id}', ['as' => 'products.update', 'uses' => 'ProductsController@update']);
    Route::get('orders', ['as' => 'orders.index', 'uses' => 'OrdersController@index']);
    Route::get('orders/edit/{id}', ['as' => 'orders.edit', 'uses' => 'OrdersController@edit']);
    Route::post('orders/update/{id}', ['as' => 'orders.update', 'uses' => 'OrdersController@update']);
    Route::get('cupoms', ['as' => 'cupoms.index', 'uses' => 'CupomsController@index']);
    Route::get('cupoms/edit/{id}', ['as' => 'cupoms.edit', 'uses' => 'CupomsController@edit']);
    Route::post('cupoms/update/{id}', ['as' => 'cupoms.update', 'uses' => 'CupomsController@update']);
    Route::get('cupoms/create', ['as' => 'cupoms.create', 'uses' => 'CupomsController@create']);
    Route::post('cupoms/store', ['as' => 'cupoms.store', 'uses' => 'CupomsController@store']);
});
route::group(['middleware' => 'cors'], function () {
    route::group(['prefix' => 'api', 'middleware' => 'oauth', 'as' => 'api.'], function () {
        Route::group(['prefix' => 'client', 'middleware' => 'oauth.checkrole:client', 'as' => 'client.'], function () {
            Route::resource('order', 'Api\\Client\\ClientCheckoutController', ['except' => ['create', 'edit', 'destroy']]);
            Route::get('products', 'Api\\Client\\ClientProductController@index');
        });
        Route::group(['prefix' => 'deliveryman', 'middleware' => 'oauth.checkrole:deliveryman', 'as' => 'deliveryman.'], function () {
            Route::resource('order', 'Api\\Deliveryman\\DeliverymanCheckoutController', ['except' => ['create', 'edit', 'destroy', 'store']]);
            Route::patch('order/{id}/update-status', ['uses' => 'Api\\Deliveryman\\DeliverymanCheckoutController@updateStatus', 'as' => 'orders.update_status']);
        });
    });
    Route::post('oauth/access_token', function () {
        return Response::json(Authorizer::issueAccessToken());
    });
});
开发者ID:daniloesser,项目名称:codedelivery,代码行数:31,代码来源:routes.php

示例2: function

     */
    Route::get('/login', ['as' => 'auth.formLogin', 'uses' => 'Auth\\AuthController@getLogin']);
    Route::post('/login', ['as' => 'auth.login', 'uses' => 'Auth\\AuthController@postLogin']);
    Route::get('/logout', ['as' => 'auth.logout', 'uses' => 'Auth\\AuthController@getLogout']);
    /*
     * Registration routes
     */
    /*
     Route::get('/register', ['as' => 'auth.formRegister', 'uses' => 'Auth\AuthController@getRegister']);
     Route::post('/register', ['as' => 'auth.register', 'uses' => 'Auth\AuthController@postRegister']);
    */
});
route::group(['prefix' => 'password'], function () {
    /*
     * Password reset link request routes
     */
    Route::get('/email', ['as' => 'password.formPassword', 'uses' => 'Auth\\PasswordController@getEmail']);
    Route::post('/email', 'Auth\\PasswordController@postEmail');
    /*
     * Password reset routes
     */
    Route::get('/reset/{token}', 'Auth\\PasswordController@getReset');
    Route::post('/reset', 'Auth\\PasswordController@postReset');
    /*
     * Nova Senha
     */
    Route::group(['middleware' => ['auth', 'needsRole'], 'is' => ['admin', 'gestor'], 'any' => true], function () {
        Route::get('/senha', ['as' => 'password.getNewpassword', 'uses' => 'Auth\\PasswordController@getNewPassword']);
        Route::post('/senha', ['as' => 'password.postNewpassword', 'uses' => 'Auth\\PasswordController@postNewPassword']);
    });
});
开发者ID:viniciusbrito,项目名称:sismid,代码行数:31,代码来源:routes.php

示例3: function

    return Redirect::to('auth/login');
});
Route::get('home', 'HomeController@index');
Route::controllers(['password' => 'Auth\\PasswordController']);
// Authentication routes...
Route::get('auth/login', 'Auth\\AuthController@getLogin');
Route::post('auth/login', 'Auth\\AuthController@postLogin');
Route::get('auth/logout', 'Auth\\AuthController@getLogout');
Route::group(['prefix' => 'admin'], function () {
    /*these has middle ware guest in controller AuthController*/
    route::get('/', function () {
        return Redirect::to('admin/dashboard');
    });
    Route::get('/logout', 'Admin\\AdminAuthController@getAdminLogout');
    route::group(['middleware' => ['admin-guest']], function () {
        route::get('/login', 'Admin\\AdminAuthController@getAdminLogin');
        route::post('/login', 'Admin\\AdminAuthController@postAdminLogin');
    });
    /*secure admin routes*/
    route::group(['middleware' => ['admin-auth']], function () {
        route::get('/dashboard', 'Admin\\AdminDashboardController@getDashboard');
        route::group(['prefix' => 'clients'], function () {
            route::get('/', 'Admin\\AdminClientsController@getClients');
            route::get('/add', 'Admin\\AdminClientsController@getAddClient');
            route::post('/add', 'Admin\\AdminClientsController@postAddClient');
        });
    });
});
// Registration routes...for the users and anybody else are disabled.
/*Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');*/
开发者ID:Tech-Arays,项目名称:needleapp,代码行数:31,代码来源:routes.php

示例4: function

    // Registration
    Route::get('daftar', ['as' => 'auth.register.form', 'uses' => 'Auth\\RegistrationController@getRegister']);
    Route::post('daftar', ['as' => 'auth.register.attempt', 'uses' => 'Auth\\RegistrationController@postRegister']);
    // Activation
    Route::get('activate/{code}', ['as' => 'auth.activation.attempt', 'uses' => 'Auth\\RegistrationController@getActivate']);
    Route::get('resend', ['as' => 'auth.activation.request', 'uses' => 'Auth\\RegistrationController@getResend']);
    Route::post('resend', ['as' => 'auth.activation.resend', 'uses' => 'Auth\\RegistrationController@postResend']);
    // Password Reset
    Route::get('password/reset/{code}', ['as' => 'auth.password.reset.form', 'uses' => 'Auth\\PasswordController@getReset']);
    Route::post('password/reset/{code}', ['as' => 'auth.password.reset.attempt', 'uses' => 'Auth\\PasswordController@postReset']);
    Route::get('password/reset', ['as' => 'auth.password.request.form', 'uses' => 'Auth\\PasswordController@getRequest']);
    Route::post('password/reset', ['as' => 'auth.password.request.attempt', 'uses' => 'Auth\\PasswordController@postRequest']);
    route::group(['middleware' => ['completedProfil']], function () {
        Route::get('/', ['as' => 'utama', function () {
            return view('centaur.dashboard');
        }]);
        //profil
        Route::get('/{hash}', ['as' => 'profil.show', 'uses' => 'ProfilController@show']);
    });
    //tetapan
    Route::get('tetapan/profil', ['as' => 'profil.tetapan', 'uses' => 'ProfilController@getProfil']);
    Route::patch('profil/{id}', ['as' => 'tetapan.profil.update', 'uses' => 'ProfilController@postProfil']);
    Route::group(['prefix' => 'pentadbir'], function () {
        Route::resource('dashboard', 'DashboardController');
        // Users
        Route::resource('users', 'UserController');
        // Roles
        Route::get('api/roles', ['as' => 'datatables.roles', 'uses' => 'RoleController@dataTables']);
        Route::resource('roles', 'RoleController');
    });
});
开发者ID:iskandarali,项目名称:centourisk,代码行数:31,代码来源:routes.php

示例5: view

<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::when('*', 'csrf', ['post']);
/*Route::get('/', function () {
    return view('welcome');
});
*/
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
Route::get('home', 'HomeController@index');
Route::resource('/', 'FrontController');
route::group(['middleware' => 'auth'], function () {
    Route::resource('admin/categoria', 'CategoriaControlador');
    Route::resource('producto', 'ProductoControlador');
    Route::resource('admin/presentacion', 'PresentacionControlador');
    //Route::resource('admin/producto','WelcomeController');
});
开发者ID:ahuitz,项目名称:Zrokbox,代码行数:26,代码来源:routes.php

示例6: function

| 后台通用route
|--------------------------------------------------------------------------
*/
route::group(array('prefix' => 'shopadmin'), function () {
    # 系统分类
    route::match(array('GET', 'POST'), '/', array('as' => 'shopadmin', 'uses' => 'desktop_router@dispatch'));
});
/*
|--------------------------------------------------------------------------
| setup
|--------------------------------------------------------------------------
*/
route::group(array('prefix' => 'setup'), function () {
    # 安装首页
    route::match(array('GET', 'POST'), '/', ['as' => 'setup', 'uses' => 'setup_ctl_default@index']);
    # 安装页
    route::match(array('GET', 'POST'), '/default/process', ['uses' => 'setup_ctl_default@process']);
    # 命令行安装
    route::match(array('GET', 'POST'), '/default/install_app', ['uses' => 'setup_ctl_default@install_app']);
    # console
    route::match(array('GET', 'POST'), '/default/console', ['uses' => 'setup_ctl_default@console']);
    # 激活
    route::match(array('GET', 'POST'), '/default/active', ['uses' => 'setup_ctl_default@active']);
    # 激活成功
    route::match(array('GET', 'POST'), '/default/success', ['uses' => 'setup_ctl_default@success']);
    # 环境初始化
    route::match(array('GET', 'POST'), '/default/initenv', ['uses' => 'setup_ctl_default@initenv']);
    # 女装初始化数据
    route::match(array('GET', 'POST'), '/default/install_demodata', ['uses' => 'setup_ctl_default@install_demodata']);
    route::match(array('GET', 'POST'), '/default/setuptools', ['uses' => 'setup_ctl_default@setuptools']);
});
开发者ID:453111208,项目名称:bbc,代码行数:31,代码来源:routes.php


注:本文中的route::group方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。