本文整理汇总了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');
}
}
示例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');
示例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');
});
示例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');
示例5: boot
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Route::controller('/api-layer', \Andersonef\ApiImplementation\Http\Controllers\ApiLayer::class);
}