本文整理汇总了PHP中route::controller方法的典型用法代码示例。如果您正苦于以下问题:PHP route::controller方法的具体用法?PHP route::controller怎么用?PHP route::controller使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类route
的用法示例。
在下文中一共展示了route::controller方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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.
|
*/
use App\Models;
Route::get('/', 'WelcomeController@index');
Route::get('/lista', function () {
return View::make('lista.lista');
});
route::controller('lista/plataformas', 'PlataformaController');
Route::controller('lista/requisicao_banco', 'UsuarioXJogoController');
//Route::controller('lista/requisicao_banco', ['middleware' => 'auth', 'uses' => 'UsuarioXJogoController']);
Route::controller('lista', 'ListaController');
/*Route::get('meus_jogos', ['middleware' => 'auth', 'uses' => 'ListaController@meusJogos' ]);
Route::get('jogando', ['middleware' => 'auth', 'uses' => 'ListaController@getJogando' ]);
Route::get('joguei', ['middleware' => 'auth', 'uses' => 'ListaController@getJoguei' ]);*/
Route::controller('perfil', 'ListaController');
Route::get('login', array('uses' => 'HomeController@showLogin'));
Route::post('login', array('uses' => 'HomeController@doLogin'));
Route::get('auth/login', function () {
return View::make('auth.login');
});
/*Route::controller('cadastro', 'CadastroController');*/
示例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('/', function () {
return view('startbootstrap.homepage');
});
Route::get('dashboard', function () {
return view('startbootstrap.dashboard');
});
Route::controller('player', 'PlayerController');
Route::controller('team', 'TeamController');
Route::controller('calendar', 'CalendarController');
Route::controller('match', 'MatchController');
Route::get('season/show/{id_match}', 'SeasonController@show');
route::controller('season', 'SeasonController');
示例3: 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.
|
*/
// Authentication routes...
//Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::get('auth/login', function () {
return view('auth/login');
});
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::get('/', function () {
return view('welcome');
});
route::controller('/', 'Auth\\AuthController');