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


PHP Route::controller方法代码示例

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


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

示例1: boot

 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->package('mmanos/laravel-social');
     if ($route = Config::get('laravel-social::route')) {
         Route::get($route . '/login/{provider}', array('as' => 'social-login', 'uses' => 'Mmanos\\Social\\SocialController@getLogin'));
         Route::get($route . '/connect/{provider}', array('as' => 'social-connect', 'uses' => 'Mmanos\\Social\\SocialController@getConnect'));
         Route::controller($route, 'Mmanos\\Social\\SocialController');
     }
 }
开发者ID:mmanos,项目名称:laravel-social,代码行数:14,代码来源:SocialServiceProvider.php

示例2: function

     Route::post('group/remove_role/{group}', 'Save@removeRole');
     Route::post('group/add_role/{group}', 'Save@addRole');
     Route::post('group/delete/{group}', 'Save@delete');
     Route::post('group/save/{group}', 'Save@save');
     Route::get('group/edit/{group}', ['as' => 'group-edit', 'uses' => 'View@edit']);
 });
 Route::group(['prefix' => 'templates'], function () {
     Route::get('', 'Templates@index');
     Route::get('pages/{template}.{format?}', 'Templates@pages');
     Route::post('save', 'Templates@save');
     Route::post('delete/{template}', 'Templates@delete');
 });
 Route::group(['prefix' => 'pages'], function () {
     Route::get('', 'Pages@index');
 });
 Route::controller('chunk/{page}', 'Chunk');
 Route::group(['prefix' => 'page', 'namespace' => 'Page'], function () {
     Route::post('discard/{page}', 'PageController@discard');
     Route::group(['prefix' => 'version', 'namespace' => 'Version'], function () {
         Route::get('template/{page}', 'View@template');
         Route::post('template/{page}', 'Save@template');
         Route::post('title/{page}', 'Save@title');
         Route::get('embargo/{page}', 'View@embargo');
         Route::post('embargo/{page}', 'Save@embargo');
         Route::get('status/{page}', 'View@status');
     });
 });
 Route::post('page/add/{page}', 'Page\\PageController@add');
 Route::get('page/{page}/urls', 'Page\\PageController@urls');
 Route::get('page/{page}/urls/add', 'Page\\Urls@getAdd');
 Route::get('page/{page}/urls/{url}/move', 'Page\\Urls@getMove');
开发者ID:imanghafoori1,项目名称:boom-core,代码行数:31,代码来源:routes.php

示例3: function

/* ------------------------------------------------- *\
    Front
\* ------------------------------------------------- */
use Illuminate\Support\Facades\Route;
Route::get('/', 'HomeController@show');
Route::get('student', 'StudentController@show');
Route::get('student/{id}', 'StudentController@showStudent');
//Route::get('tag', 'TagController@show');
//Route::get('tag/{id}', 'TagController@showTag');
Route::get('post', 'FrontController@show');
// one post
Route::get('post/{id}', 'FrontController@showPost');
// posts by category
Route::get('category/{id}', 'FrontController@showPostByCategory');
/* ------------------------------------------------- *\
    REST Controller event
\* ------------------------------------------------- */
Route::resource('event', 'EventController');
Route::resource('tag', 'TagController');
Route::resource('comment', 'CommentController');
/* ------------------------------------------------- *\
    Auth
\* ------------------------------------------------- */
Route::controller('auth', 'Auth\\AuthController');
/* ------------------------------------------------- *\
    Dashboard
\* ------------------------------------------------- */
Route::get('dashboard', 'Admin\\DashboardController@index');
Route::group(['prefix' => 'admin'], function () {
    Route::resource('post', 'Admin\\PostController');
});
开发者ID:Antoine07,项目名称:student,代码行数:31,代码来源:routes.php

示例4: function

<?php

use Illuminate\Support\Facades\Route;
Route::get('/', function () {
    return view('home.home');
});
Route::get('dashboard', function () {
    return view('dashboard.dashboard');
});
Route::controller('dashboard', 'DashboardController');
Route::controller('account', 'AccountController');
Route::controller('booking', 'BookingController');
Route::controller('shop', 'ProductController');
Route::controller('contact', 'ContactController');
Route::controller('/home', 'HomeController');
Route::controller('invoice', 'InvoiceController');
Route::controller('user', 'UserController');
开发者ID:rniocena,项目名称:cms-manage,代码行数:17,代码来源:routes.php

示例5: boot

 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     Route::controller('/api-layer', \Andersonef\ApiImplementation\Http\Controllers\ApiLayer::class);
 }
开发者ID:andersonef,项目名称:api-implementation,代码行数:9,代码来源:ApiServiceProvider.php


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