本文整理汇总了PHP中Illuminate\Support\Facades\Route::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Route::get方法的具体用法?PHP Route::get怎么用?PHP Route::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Support\Facades\Route
的用法示例。
在下文中一共展示了Route::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: boot
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
$this->package('mmanos/laravel-casset');
if ($route = Config::get('laravel-casset::route')) {
Route::get(trim($route, '/') . '/{type}', 'Mmanos\\Casset\\CassetController@getIndex');
}
}
示例2: boot
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
$this->package('mmanos/laravel-image');
if ($route = Config::get('laravel-image::route')) {
Route::get($route, 'Mmanos\\Image\\ImagesController@getIndex');
}
}
示例3: _routes_index
public static function _routes_index()
{
$_class = get_called_class();
$_uri = static::$uri;
$_as = static::$action;
Route::get("{$_uri}/index", ['as' => "{$_as}.show.index", 'uses' => "{$_class}@index"]);
}
示例4: setUp
public function setUp()
{
parent::setUp();
Route::get('login-success', function () {
return 'Login success';
});
}
示例5: boot
public function boot()
{
$this->package('mrosati84/laradmin');
$prefix = Config::get('laradmin::prefix');
$namespace = Config::get('laradmin::namespace');
$entities = Config::get('laradmin::entities');
foreach ($entities as $entity => $properties) {
$fullClassName = $namespace . '\\' . $entity . 'Admin';
$baseAdminController = 'Mrosati84\\Laradmin\\BaseAdminController';
// register admin classes bindings
App::bind($fullClassName, function () use($fullClassName, $entity) {
return new $fullClassName($entity);
});
// register custom filters classes
App::bind('AuthenticationFilter', 'Mrosati84\\Laradmin\\Filters\\AuthenticationFilter');
// register custom route filters
Route::filter('laradmin.auth', 'AuthenticationFilter');
// register laradmin index route (just a redirect to default entity)
Route::get($prefix, array('as' => 'laradmin.index', function () use($prefix) {
return Redirect::route($prefix . '.' . strtolower(Config::get('laradmin::defaultEntity')) . '.index');
}));
// register entities routes
Route::group(array('prefix' => $prefix, 'before' => 'laradmin.auth'), function () use($entity, $fullClassName) {
Route::resource(strtolower($entity), $fullClassName);
});
}
}
示例6: _routes_show
public static function _routes_show()
{
$_class = get_called_class();
$_uri = static::$uri;
$_as = static::$action;
Route::get("{$_uri}/show/{id}", ['as' => "{$_as}.show.detail", 'uses' => "{$_class}@show"]);
}
示例7: mapAuthRoutes
protected function mapAuthRoutes()
{
Route::group(['middleware' => 'web', 'namespace' => $this->namespace], function ($router) {
Route::auth();
Route::get('/logout', 'Auth\\LoginController@logout');
});
}
示例8: register
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$app = $this->app;
Route::get('/securimage', array('as' => 'tuanlq11.securimage', 'uses' => 'tuanlq11\\securimage\\SecurImageController@getCaptcha'));
$app->bind('securimage', function () {
return new SecurImageAutoLoad();
});
}
示例9: routes
public static function routes()
{
foreach (Page::get() as $page) {
if (isset($page->url) && $page->url !== '') {
Route::get($page->url, 'PageRoute@show');
}
}
}
示例10: boot
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
$this->publishes([__DIR__ . '/config/config.php' => config_path('casset.php')], 'config');
$this->mergeConfigFrom(__DIR__ . '/config/config.php', 'casset');
if ($route = $this->app['config']->get('casset.route')) {
Route::get(trim($route, '/') . '/{type}', 'Simexis\\Casset\\Controllers\\CassetController@getIndex');
}
}
示例11: routes
public static function routes()
{
Route::get('/login', 'AdminLogin@getLogin');
Route::get('/admin-login', 'AdminLogin@getLogin');
Route::get('/admin', 'AdminLogin@forwardAdmin');
Route::post('/admin-login', 'AdminLogin@postLogin');
Route::get('/logout', 'Logout@getLogout');
}
示例12: it_can_reset_password
/**
* @test
*/
public function it_can_reset_password()
{
Route::get('reset-password-success', function () {
return 'login success';
});
$this->visitRoute('auth::reset', $this->token)->type($this->email, 'email')->type('1nd0n351a r4y4', 'password')->type('1nd0n351a r4y4', 'password_confirmation')->press(trans('auth::auth.reset_password'))->seePageIs('reset-password-success');
$this->seeIsAuthenticated();
}
示例13: registerDevelopRoute
protected function registerDevelopRoute(ScriptFinder $finder)
{
foreach ($finder->getScriptUrlTable() as $url => $path) {
Route::get("{$url}", function () use($path) {
return Response::make(App::make('script-auto-compiler-l4')->compile($path), 200, ['Content-Type' => 'text/javascript']);
});
}
}
示例14: routes
private function routes()
{
Route::get('/', array('uses' => self::$wardrobeControllers . 'AdminController@index', 'as' => 'wardrobe.admin.index'));
Route::get('logout', array('uses' => self::$wardrobeControllers . 'LoginController@destroy', 'as' => 'wardrobe.admin.logout'));
Route::get('login', array('uses' => self::$wardrobeControllers . 'LoginController@create', 'as' => 'wardrobe.admin.login'));
Route::post('login', array('uses' => self::$wardrobeControllers . 'LoginController@store'));
Route::get('login/remind', array('uses' => self::$wardrobeControllers . 'LoginController@remindForm', 'as' => 'wardrobe.admin.remindForm'));
Route::post('login/remind', array('uses' => self::$wardrobeControllers . 'LoginController@remindSend'));
}
示例15: 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');
}
}