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


PHP Route::Controller方法代码示例

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


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

示例1: function

<?php

Route::group(['middleware' => ['web']], function () {
    Route::Controller('main', 'MainController');
    Route::get('/', 'MainController@getIndex');
    Route::get('Home', 'MainController@getIndex');
    Route::get('About', 'MainController@getAbout');
    Route::get('Blog', 'MainController@getBlog');
    Route::get('Portfolio', 'MainController@getPortfolio');
    Route::get('Contact', 'MainController@getContact');
});
开发者ID:ariegeorgee,项目名称:LaravelSimpleWebsite,代码行数:11,代码来源:routes.php

示例2: function

/*
|--------------------------------------------------------------------------
| 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 view('welcome');
// });
/*
|--------------------------------------------------------------------------
| 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::Controller('/plan', 'PlanController');
    Route::Controller('/expense', 'ExpenseController');
    Route::Controller('/progress', 'ProgressController');
    Route::Controller('/admin', 'AdminController');
    Route::Controller('/', 'HomeController');
});
开发者ID:Thitiwut,项目名称:money-flow,代码行数:30,代码来源:routes.php

示例3: function

<?php

//API接口路由
Route::group(['domain' => 'mapi.pianke.me', 'middleware' => 'api'], function () {
    Route::Controller('pub', 'ApiPubController');
});
//后台路由 admin.pianke.me
Route::group(['domain' => 'admin.pianke.me', 'middleware' => 'csrf'], function () {
    Route::Controller('auth', 'AdminLoginController');
    Route::group(['middleware' => 'adminauth'], function () {
        Route::get('/', 'AdminHomeController@getIndex');
        Route::Controller('home', 'AdminHomeController');
        Route::Controller('jing', 'AdminJingController');
        Route::Controller('system', 'AdminManagerController');
        Route::Controller('download', 'AdminDownloadController');
        Route::Controller('helper', 'AdminHelperController');
        Route::Controller('passport', 'AdminPassportController');
    });
});
//片刻new前台
Route::group(['domain' => 'new.pianke.me', 'middleware' => 'csrf'], function () {
    Route::get('/', 'DownloadController@getApp');
    Route::get('/index', 'DefaultController@getIndex');
    Route::get('download', 'DownloadController@getDownload');
    Route::get('download/{str}', 'DownloadController@getDownload');
    Route::Controller('jing', 'JingController');
    Route::Controller('passport', 'PassportController');
});
开发者ID:9618211,项目名称:php-laravel-rbac,代码行数:28,代码来源:routes.php

示例4: function

| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
Route::get('/', function () {
    if (Session::has('kukki_user')) {
        return Redirect::to('site/index');
    } else {
        return Redirect::to('site/login');
    }
});
App::missing(function ($exception) {
    // return Response::view('errors.missing', array(), 404);
    return Redirect::to('site/error-page');
});
Route::Controller('site', 'SiteController');
// API
Route::get('site/active-account', array('uses' => 'SiteController@activeEmail'));
Route::post('', array('uses' => 'UserController@saveImage'));
//Route::get('{id}', array('uses'=>'UserController@getUserAvatar'));
Route::group(array('prefix' => 'upload'), function () {
    Route::group(array('prefix' => 'account'), function () {
        Route::post('', array('uses' => 'UserController@saveImage'));
    });
});
Route::group(array('prefix' => 'api'), function () {
    Route::group(array('prefix' => 'account'), function () {
        Route::get('{id}', array('uses' => 'UserController@getUser'));
        Route::get('avatar/{id}', array('uses' => 'UserController@getAvatar'));
        Route::get('img-cover/{id}', array('uses' => 'UserController@getImageCover'));
        Route::get('speciality/{id}', array('uses' => 'UserController@getSpeciality'));
开发者ID:KukkiTeam,项目名称:Kukki,代码行数:31,代码来源:routes.php

示例5: function

Route::group(['prefix' => 'admin'], function () {
    Route::get('/', function () {
        return view('welcome');
    });
});
Route::get('Welcome', 'Welcome@index');
Route::get('salut/{name}', function ($name) {
    return 'salut ' . $name;
});
Route::get('bootstrap', function () {
    return view('vue1');
});
Route::get('article/{n}', 'articleController@show')->where('n', '[0-9]+');
Route::get('slug/{slug}-{id}', ['as' => 'slug', function ($slug, $id) {
    return 'lien:' . route('slug', ['slug' => $slug, 'id' => $id]);
}])->where('slug', '[aA-zZ0-9\\-]+')->where('id', '[0-9]+');
/*
|--------------------------------------------------------------------------
| 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::Controller('welcome', 'Welcome');
Route::get('a-propos', ['as' => 'about', 'uses' => 'PagesController@about']);
Route::group(['middleware' => ['web']], function () {
    //
});
开发者ID:Stanislas-Quentin,项目名称:laratest,代码行数:31,代码来源:routes.php

示例6: function

});
Route::get('dev', function () {
    return View::make('Devolucao.Devolucao');
});
Route::get('cons', function () {
    return View::make('Consulta.Consulta');
});
Route::get('utente', 'UtenteController@getCriar');
Route::get('filme', 'FilmeController@getCriar');
Route::get('emprestimo', 'EmprestimoController@getCriar');
Route::get('devolucao', 'DevolucaoController@getCriar');
Route::get('listaEmp', 'EmprestimoController@getIndex');
Route::get('listaDev', 'DevolucaoController@getIndex');
Route::get('listaUte', 'UtenteController@getIndex');
Route::get('listaFilm', 'FilmeController@getIndex');
Route::post('saveUte', 'UtenteController@postGravar');
Route::post('saveFilm', 'FilmeController@postGravar');
Route::get('empres', 'EmprestimoController@getCriar');
Route::get('dev', 'DevolucaoController@getCriar');
Route::post('saveEmp', 'EmprestimoController@postGravar');
Route::post('saveDev', 'DevolucaoController@postGravar');
Route::get('cons', 'FilmeController@getVideo');
Route::Controller('utedel', 'UtenteController');
Route::Controller('uteede', 'UtenteController');
Route::post('upUte', 'UtenteController@postAct');
Route::Controller('filede', 'FilmeController');
Route::post('upFilm', 'FilmeController@postAct');
Route::Controller('filmdel', 'FilmeController');
Route::Controller('empredel', 'EmprestimoController');
Route::Controller('devdel', 'DevolucaoController');
Route::post('pesqData', 'EmprestimoController@getSearch');
开发者ID:hillasAd,项目名称:LOCADORA,代码行数:31,代码来源: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 Closure to execute when that URI is requested.
|
*/
Route::get('/', function () {
    return View::make('hello');
});
Route::controller('user', 'UserController');
Route::controller('pancardoffline', 'PanoffilineController');
Route::controller('recharge', 'RechargeController');
Route::controller('itr', 'ItrController');
Route::controller('service', 'ServiceController');
Route::controller('ledgerreport', 'LedgerController');
Route::controller('ledger', 'LedgerreportController');
Route::Controller('icash', 'IcashController');
开发者ID:arctic-dev,项目名称:appandukan-ws,代码行数:23,代码来源:routes.php

示例8: 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.
|
*/
Route::get('/', 'WelcomeController@index');
Route::get('home', 'HomeController@index');
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
//前端页面
Route::group(['namespace' => 'Home'], function () {
    Route::Controller('user', 'UserController');
    Route::post('follow', ['as' => 'follow', 'uses' => 'FollowController@store']);
    Route::post('unfollow', ['as' => 'unfollow', 'uses' => 'FollowController@destroy']);
    Route::get('search', ['as' => 'search', 'uses' => 'SearchController@index']);
    Route::get('search/result', ['as' => 'search.search', 'uses' => 'SearchController@search']);
    Route::get('post/{id}', ['as' => 'post.show', 'uses' => 'PostController@show']);
});
Route::get('download', ['as' => 'download', 'uses' => 'Home\\DownloadController@index']);
//文件下载响应
Route::get('download/last', ['as' => 'download.last', 'uses' => 'Home\\DownloadController@downloadFile']);
//==================================================================//
Route::group(['namespace' => 'Admin', 'prefix' => 'admin'], function () {
    Route::get('/', 'AdminController@index');
    //
    Route::post('menu/{id}/update', ['as' => 'admin.menu.update', 'uses' => 'MenuController@update']);
    Route::resource('menu', 'MenuController', ['names' => ['index' => 'admin.menu']]);
开发者ID:nutsdo,项目名称:mz-service,代码行数:31,代码来源:routes.php

示例9: 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 Closure to execute when that URI is requested.
 |
*/
Route::group(array('before' => 'track'), function () {
    Route::get('/', 'LoginController@getIndex');
    Route::Controller('login', 'LoginController');
    Route::Controller('login/login{first}', 'LoginController');
    Route::Controller('user', 'UserController');
    Route::Controller('message-types', 'MessageTypesController');
});
Route::group(array('before' => 'track|sentry.auth'), function () {
    Route::Controller('home', 'HomeController');
    Route::Controller('setting', 'SettingController');
    Route::Controller('gcm-users', 'GCMUserController');
    Route::Controller('send-notif', 'SendNotifController');
    Route::Controller('notif', 'NotifController');
    Route::Controller('feedback', 'FeedbackController');
});
Route::Controller('install', 'InstallController');
Route::resource('api-send-notif', 'APINotifController');
Route::resource('api-user', 'APIGCMUserController');
开发者ID:Hounge,项目名称:Android_Push_Server,代码行数:30,代码来源:routes.php

示例10:

<?php

/**
 * --------------------------------------------------------------------------
 * Cartify
 * --------------------------------------------------------------------------
 *
 * Cartify, a shopping cart bundle for use with the Laravel Framework.
 *
 * @package  Cartify
 * @version  2.1.1
 * @author   Bruno Gaspar <brunofgaspar1@gmail.com>
 * @link     https://github.com/bruno-g/cartify
 */
#############################################################
############ This file is for the examples only! ############
#############################################################
Route::any('cartify/view/(:any)', 'cartify::view@index');
Route::Controller(Controller::detect('cartify'));
开发者ID:TahsinGokalp,项目名称:L3-Eticaret,代码行数:19,代码来源:routes.php

示例11: function

|
| 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::get('user/login', ['as' => 'login', function () {
    //return redirect()->route('/');
    return '用户登录';
}]);
Route::get('user/profile', function () {
    return redirect()->route('login');
});
//前台
Route::group(['prefix' => 'Home', 'namespace' => 'Home'], function () {
    Route::get('index', 'IndexController@index');
    //首页控制器
    Route::Controller('center-index', 'MyCenterController');
    //
});
//后台
//前台
Route::group(['prefix' => 'Admin', 'namespace' => 'Admin'], function () {
    Route::Controller('login', 'LoginController');
    //
    // Route::get('login','LoginController@Login');
    // Route::get('index', 'IndexController@index'); //首页控制器
});
开发者ID:redisZX,项目名称:blog,代码行数:31,代码来源:routes.php


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