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


PHP Route::controllers方法代码示例

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


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

示例1: function

<?php

Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController', 'errors' => 'ErrorController', 'page' => 'PageController']);
Route::get('/', function () {
    return redirect('page/home');
});
Route::get('day/generate', ['as' => 'day.generate', 'uses' => 'DayController@generate']);
Route::get('day/create/{date?}', ['as' => 'day.create', 'uses' => 'DayController@create']);
Route::get('recette/categorie/{tag?}', ['as' => 'recipe.category', 'uses' => 'RecipeController@index']);
Route::get('ingredient/categorie/{tag?}', ['as' => 'ingredient.category', 'uses' => 'IngredientController@index']);
Route::resource('day', 'DayController');
Route::resource('recipe', 'RecipeController');
Route::resource('ingredient', 'IngredientController');
Route::resource('tag', 'TagController');
Route::resource('supply', 'SupplyController');
开发者ID:Carderon,项目名称:intendant,代码行数:15,代码来源:routes.php

示例2: function

<?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::get('/', 'HomeController@getIndex');
Route::controllers(['admin' => 'AdminController', 'user' => 'UserController', 'auth' => 'AuthController', 'article' => 'ArticleController', 'comment' => 'CommentController', 'test' => 'TestController', 'home' => 'HomeController', 'release' => 'Home\\ReleaseController', 'visitor' => 'VisitorController']);
/**
 * 前台路由组
 */
//Route::group(array('prefix' => 'home'), function()
//{
//    $HomeController = 'HomeController@';
//    //
//    Route::get('article/{$id}', $HomeController.'getArticle');
//    Route::post('comment/{$id}', $HomeController.'postComment');
//
//});
/**
 * 管理权限路由组
 */
Route::group(array('prefix' => 'perm'), function () {
    $PermController = 'PermController@';
    //团队职务
开发者ID:sylvanasGG,项目名称:laravel_lte,代码行数:31,代码来源:routes.php

示例3:

<?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.
|
*/
// Static Pages routes
Route::get('/', 'PagesController@index');
Route::get('/about.html', 'PagesController@about');
Route::get('/contacts.html', 'PagesController@contacts');
// Authentication routes...
Route::get('auth/login', 'Auth\\AuthController@getLogin');
Route::post('auth/login', 'Auth\\AuthController@postLogin');
Route::get('auth/logout', 'Auth\\AuthController@getLogout');
// Registration routes...
Route::get('auth/register', 'Auth\\AuthController@getRegister');
Route::post('auth/register', 'Auth\\AuthController@postRegister');
Route::controllers(['password' => 'Auth\\PasswordController']);
开发者ID:Timures,项目名称:clubon,代码行数:24,代码来源:routes.php

示例4: function

<?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::get('/', function () {
    return view('welcome');
});
Route::controllers(['plotter' => 'PlotterController']);
开发者ID:Cadrach,项目名称:dimensions,代码行数:16,代码来源:routes.php

示例5: function

             Route::get('{report}/dismiss', 'ReportsController@getDismiss');
             Route::get('{report}/dismiss-ip', 'ReportsController@getDismissIp');
             Route::get('{post}/dismiss-post', 'ReportsController@getDismissPost');
             Route::get('{report}/promote', 'ReportsController@getPromote');
             Route::get('{post}/promote-post', 'ReportsController@getPromotePost');
             Route::get('{report}/demote', 'ReportsController@getDemote');
             Route::get('{post}/demote-post', 'ReportsController@getDemotePost');
         });
     });
     Route::group(['namespace' => 'Boards', 'prefix' => 'board'], function () {
         Route::controllers(['{board}/staff/{user}' => 'StaffingController', '{board}/staff' => 'StaffController', '{board}/role/{role}' => 'RoleController', '{board}/roles' => 'RolesController', '{board}' => 'ConfigController']);
     });
     Route::group(['namespace' => 'Site', 'prefix' => 'site'], function () {
         Route::get('/', 'SiteController@getIndex');
         Route::get('phpinfo', 'SiteController@getPhpinfo');
         Route::controllers(['config' => 'ConfigController']);
     });
     Route::group(['namespace' => 'Users', 'prefix' => 'users'], function () {
         Route::get('/', 'UsersController@getIndex');
     });
     Route::group(['namespace' => 'Roles', 'prefix' => 'roles'], function () {
         Route::controller('permissions/{role}', 'PermissionsController');
         Route::get('permissions', 'RolesController@getPermissions');
     });
 });
 /*
 | Page Controllers
 | Catches specific strings to route to static content.
 */
 if (env('CONTRIB_ENABLED', false)) {
     Route::get('contribute', 'PageController@getContribute');
开发者ID:JEWSbreaking8chan,项目名称:infinity-next,代码行数:31,代码来源:routes.php

示例6: function

    Route::get('checkout/placeOrder', ['as' => 'store.checkout.place', 'uses' => 'CheckoutController@place']);

    Route::get('account/orders', ['as' => 'store.account.orders', 'uses' => 'AccountController@orders']);

});

Route::get('evento', function() {
    //\Illuminate\Support\Facades\Event::fire(new \CodeCommerce\Events\CheckoutEvent());
    // mesmo que:
    event(new \CodeCommerce\Events\CheckoutEvent());
});

Route::controllers([
    'auth' => 'Auth\AuthController',
    'password' => 'Auth\PasswordController',
    'test' => 'TestController',
]);

Route::group(['prefix' => 'admin', 'middleware' => 'auth.admin'], function () {

    Route::group(['prefix' => 'categories'], function () {
        Route::get('/', ['as' => 'admin.categories', 'uses' => 'AdminCategoriesController@index']);
        Route::get('create', ['as' => 'admin.categories.create', 'uses' => 'AdminCategoriesController@create']);
        Route::post('store', ['as' => 'admin.categories.store', 'uses' => 'AdminCategoriesController@store']);
        Route::get('show/{id}', ['as' => 'admin.categories.show', 'uses' => 'AdminCategoriesController@show']);
        Route::get('edit/{id}', ['as' => 'admin.categories.edit', 'uses' => 'AdminCategoriesController@edit']);
        Route::put('update/{id}', ['as' => 'admin.categories.update', 'uses' => 'AdminCategoriesController@update']);
        Route::get('destroy/{id}', ['as' => 'admin.categories.destroy', 'uses' => 'AdminCategoriesController@destroy']);
    });
开发者ID:henriesteves,项目名称:CodeCommerce,代码行数:29,代码来源:routes.php

示例7: function

<?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::get('/', function () {
    return view('pages.home');
});
//Route::get('my-profile', 'ProfileController@showProfile');
//Route::get('edit-profile' ,'ProfileController@showProfile');
Route::controllers(['profile' => 'ProfileController', 'user' => 'UserController', '/' => 'HomeController']);
开发者ID:pratyush20,项目名称:lara_drupal,代码行数:18,代码来源:routes.php

示例8: array

<?php

//$router->get(trans('routes.locale'), ['as' => 'welcome', 'uses' => 'LayoutController@welcome']);
//
//get('/', ['as' => 'welcome', 'uses' => 'LayoutController@welcome']);
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
Route::controllers(['service' => 'LayoutController']);
//    Route::get('contact', 'WelcomeController@contact');
//Route::get('contacts', function() {
//    $data = ['name' => 'Enes Anbar'];
//    Mail::send('layout.mail', $data, function($message) {
//        $message->to('voroshylov_dima@mail.ua')
//            ->subject('Welcome to My Website');
//    });
//});
//post('message/new', ['as' => 'message.new', 'uses' => 'MessagesController@store']);
$router->resource('articles', 'ArticlesController');
$router->resource('news', 'NewsController');
$router->resource('comments', 'CommentsController');
$router->resource('home', 'HomeController');
$router->resource('messages', 'MessagesController');
Route::resource('adminOrders', 'AdminOrdersController', array('except' => array('store')), ['middleware' => 'access', 'permissions' => 'order_view']);
post('adminOrders', ['as' => 'adminOrders.store', 'uses' => 'AdminOrdersController@store']);
Route::resource('users', 'UserController', array('except' => array('store')), ['middleware' => 'access', 'permissions' => 'user_view']);
post('users', ['as' => 'users.store', 'uses' => 'UserController@store']);
post('comments/request', ['as' => 'comments.request', 'uses' => 'CommentsController@storeRequest']);
//    post('orders/store', ['as' => 'orders.storeAdmin', 'uses' => 'AdminOrderController@storeAdmin']);
//post('home/update', ['as' => 'home.update', 'uses' => 'AuthController@update']);
get('/', ['as' => 'welcome', 'uses' => 'LayoutController@welcome']);
get('basket', ['as' => 'basket', 'uses' => 'BasketController@index']);
get('basket_guest', ['as' => 'basket.guest', 'uses' => 'BasketController@basketGuest']);
开发者ID:sashacitylight,项目名称:sashasite,代码行数:31,代码来源:routes.php

示例9: function

| 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.
|
*/
//// Authentication routes...
//Route::get('login', 'Auth\AuthController@getLogin');
//Route::post('login', 'Auth\AuthController@postLogin');
//Route::get('logout', 'Auth\AuthController@getLogout');
//
//// Registration routes...
//Route::get('register', 'Auth\AuthController@getRegister');
//Route::post('register', 'Auth\AuthController@postRegister');
Route::group(['prefix' => '/', 'namespace' => 'Admin', 'middleware' => 'auth'], function () {
    Route::get('', ['as' => 'home', function () {
        return redirect()->to('clientes');
    }]);
    Route::get('reporte', 'PdfController@transacciones');
    Route::resource('clientes', 'ClientesController');
    Route::resource('pagos', 'PagosController');
    Route::resource('tipoMonedas', 'TipoMonedas');
    Route::resource('sincronizar', 'SincronizarController');
    Route::resource('bitacora', 'BitacorasController');
    Route::POST('bitacoraPagos', 'BitacorasController@pagos');
    Route::get('sendData/{id}', 'SincronizarController@enviarDatos');
});
Route::controllers(['auth' => 'Authentication\\AuthController']);
开发者ID:Burris19,项目名称:CreditosZacapaCliente,代码行数:30,代码来源:routes.php

示例10: function

<?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::get('/', 'HomeController@index');
Route::controller('/home', 'HomeController');
Route::controller('/user', 'UserController');
include 'pageroutes.php';
include 'moduleroutes.php';
Route::get('/restric', function () {
    return view('errors.blocked');
});
Route::group(['middleware' => 'auth'], function () {
    Route::get('core/elfinder', 'Core\\ElfinderController@getIndex');
    Route::post('core/elfinder', 'Core\\ElfinderController@getIndex');
    Route::controller('/dashboard', 'DashboardController');
    Route::controllers(['core/users' => 'Core\\UsersController', 'core/logs' => 'Core\\LogsController', 'core/pages' => 'Core\\PagesController', 'core/groups' => 'Core\\GroupsController', 'core/template' => 'Core\\TemplateController']);
});
Route::group(['middleware' => 'auth', 'middleware' => 'sximoauth'], function () {
    Route::controllers(['sximo/menu' => 'Sximo\\MenuController', 'sximo/config' => 'Sximo\\ConfigController', 'sximo/module' => 'Sximo\\ModuleController', 'sximo/tables' => 'Sximo\\TablesController']);
});
开发者ID:Gadurp1,项目名称:Final-420-Project,代码行数:29,代码来源:routes.php

示例11: function

<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in 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.
|
*/
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/
Route::group(['middleware' => ['web']], function () {
    Route::controllers(['' => 'Controller']);
});
开发者ID:drewjoh,项目名称:css-parser-project,代码行数:25,代码来源:routes.php

示例12: function

<?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::get('/', function () {
    return redirect('home');
});
Route::get('home', ['as' => 'home', 'uses' => 'HomeController@index']);
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController', 'user' => 'UserController', 'group' => 'GroupController', 'permission' => 'PermissionController', 'pjzb' => 'PjzbController', 'pjbz' => 'PjbzController', 'pfdj' => 'PfdjController', 'pfjg' => 'PfjgController', 'setting' => 'SettingController']);
开发者ID:rxfu,项目名称:jspx,代码行数:17,代码来源:routes.php

示例13: function

<?php

Route::group(['prefix' => 'admin', 'middleware' => 'auth'], function () {
    Route::controllers(['themes' => '\\Scrobot\\Themes\\ThemeController']);
});
开发者ID:scrobot,项目名称:backend-themes,代码行数:5,代码来源:routes.php

示例14: function

<?php

/**
 * User : YuGang Yang
 * Date : 7/27/15
 * Time : 15:30
 * Email: smartydroid@gmail.com
 */
Route::get('/', function () {
    return redirect('/admin/auth/login');
});
Route::controllers(['admin/auth' => config('forone.auth.administrator_auth_controller', '\\Forone\\Admin\\Controllers\\Auth\\AuthController')]);
//admin
Route::group(['prefix' => 'admin', 'middleware' => ['admin.auth', 'admin.permission:admin']], function () {
    Route::group(['namespace' => '\\Forone\\Admin\\Controllers\\Permissions'], function () {
        Route::resource('roles', 'RolesController');
        Route::resource('permissions', 'PermissionsController');
        Route::resource('admins', 'AdminsController');
        Route::resource('navs', 'NavsController');
        Route::post('roles/assign-permission', ['as' => 'admin.roles.assign-permission', 'uses' => 'RolesController@assignPermission']);
        Route::post('admins/assign-role', ['as' => 'admin.roles.assign-role', 'uses' => 'AdminsController@assignRole']);
        // Image console
        Route::get('images/{images}/destroyImage', 'ImagesController@destroyImage');
        Route::resource('images', 'ImagesController');
    });
});
//upload
Route::get('/admin/qiniu/upload-token', ['as' => 'admin.qiniu.upload-token', 'uses' => 'Forone\\Admin\\Controllers\\Upload\\QiniuController@token']);
开发者ID:YogiAi,项目名称:ColorTalk_PHP,代码行数:28,代码来源:routes.php

示例15: function

<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in 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::get('/', function () {
    return redirect('user/register');
});
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/
Route::group(['middleware' => ['web']], function () {
    Route::controllers(['user' => 'UserController']);
});
开发者ID:rxfu,项目名称:dualdegree,代码行数:28,代码来源:routes.php


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