/**
  * 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');
     }
 }
 /**
  * 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
0
 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
0
 public function setUp()
 {
     parent::setUp();
     Route::get('login-success', function () {
         return 'Login success';
     });
 }
 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
0
 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
0
 protected function mapAuthRoutes()
 {
     Route::group(['middleware' => 'web', 'namespace' => $this->namespace], function ($router) {
         Route::auth();
         Route::get('/logout', 'Auth\\LoginController@logout');
     });
 }
 /**
  * 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
0
 public static function routes()
 {
     foreach (Page::get() as $page) {
         if (isset($page->url) && $page->url !== '') {
             Route::get($page->url, 'PageRoute@show');
         }
     }
 }
 /**
  * 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
0
 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
0
 /**
  * @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();
 }
 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
0
 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'));
 }
 /**
  * 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');
     }
 }
示例#16
0
 public static function _routes_trash()
 {
     $_class = get_called_class();
     $_uri = static::$uri;
     $_as = static::$action;
     Route::post("{$_uri}/trash", ['as' => "{$_as}.delete.trash", 'uses' => "{$_class}@trash"]);
     Route::get("{$_uri}/trashed", ['as' => "{$_as}.delete.trashed", 'uses' => "{$_class}@trashed"]);
     Route::post("{$_uri}/restore", ['as' => "{$_as}.delete.restore", 'uses' => "{$_class}@restore"]);
 }
示例#17
0
 public function testRoutes()
 {
     Route::group(['middleware' => ['web']], function () {
         Route::group(['middleware' => ['auth']], function () {
             Route::get('/happybirthday/test/now', '\\Willypuzzle\\Happybirthday\\Http\\Controllers\\TestController@now');
             Route::get('/happybirthday/test/date/{date}', '\\Willypuzzle\\Happybirthday\\Http\\Controllers\\TestController@date');
         });
     });
 }
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->publishes([__DIR__ . '/../../../public' => public_path('packages/devnullsoftware/api-generator')], 'public');
     View::addNamespace('ApiGenerator', __DIR__ . '/../../views');
     if (env('EXPOSE_APIS', true)) {
         Route::get('/apis', 'DevnullSoftware\\ApiGenerator\\DocsController@apis2Welcome');
         Route::get('apis/data', 'DevnullSoftware\\ApiGenerator\\DocsController@apis');
         Route::get('/apis/{api}', 'DevnullSoftware\\ApiGenerator\\DocsController@apis2');
     }
 }
示例#19
0
 public static function _routes_edit()
 {
     $_class = get_called_class();
     $_uri = static::$uri;
     $_as = static::$action;
     Route::get("{$_uri}/edit/{id}", ['as' => "{$_as}.edit.form", 'uses' => "{$_class}@edit"]);
     Route::post("{$_uri}/update/{id}", ['as' => "{$_as}.edit.update", 'uses' => "{$_class}@update"]);
     Route::get("{$_uri}/create", ['as' => "{$_as}.create.form", 'uses' => "{$_class}@create"]);
     Route::post("{$_uri}/store", ['as' => "{$_as}.create.store", 'uses' => "{$_class}@store"]);
 }
 public function setUp()
 {
     parent::setUp();
     Route::get('check', ['before' => 'logged', 'uses' => function () {
         return '';
     }]);
     Route::get('check_custom', ['before' => "logged:{$this->custom_url}", 'uses' => function () {
         return '';
     }]);
 }
 /**
  * Perform post-registration booting of services.
  *
  * @return void
  */
 public function boot()
 {
     // Publish pieces
     if (!$this->isLumen()) {
         $this->publishes([__DIR__ . '/../config/mail-tracker.php' => config_path('mail-tracker.php')], 'config');
         $this->publishes([__DIR__ . '/../migrations/2016_03_01_193027_create_sent_emails_table.php' => database_path('migrations/2016_03_01_193027_create_sent_emails_table.php')], 'config');
         $this->publishes([__DIR__ . '/../migrations/2016_09_07_193027_create_sent_emails_Url_Clicked_table.php' => database_path('migrations/2016_09_07_193027_create_sent_emails_Url_Clicked_table.php')], 'config');
         $this->publishes([__DIR__ . '/../migrations/2016_11_10_213551_add-message-id-to-sent-emails-table.php' => database_path('migrations/2016_11_10_213551_add-message-id-to-sent-emails-table.php')], 'config');
         $this->loadViewsFrom(__DIR__ . '/views', 'emailTrakingViews');
         $this->publishes([__DIR__ . '/views' => base_path('resources/views/vendor/emailTrakingViews')]);
     }
     // Hook into the mailer
     $this->app['mailer']->getSwiftMailer()->registerPlugin(new MailTracker());
     // Install the routes
     $config = $this->app['config']->get('mail-tracker.route', []);
     $config['namespace'] = 'jdavidbakr\\MailTracker';
     if (!$this->isLumen()) {
         Route::group($config, function () {
             Route::get('t/{hash}', 'MailTrackerController@getT')->name('mailTracker_t');
             Route::get('l/{url}/{hash}', 'MailTrackerController@getL')->name('mailTracker_l');
             Route::post('sns', 'SNSController@callback')->name('mailTracker_SNS');
         });
     } else {
         $app = $this->app;
         $app->group($config, function () use($app) {
             $app->get('t', 'MailTrackerController@getT')->name('mailTracker_t');
             $app->get('l', 'MailTrackerController@getL')->name('mailTracker_l');
             $app->post('sns', 'SNSController@callback')->name('mailTracker_SNS');
         });
     }
     // Install the Admin routes
     $config_admin = $this->app['config']->get('mail-tracker.admin-route', []);
     $config_admin['namespace'] = 'jdavidbakr\\MailTracker';
     if (!$this->isLumen()) {
         Route::group($config_admin, function () {
             Route::get('/', 'AdminController@getIndex')->name('mailTracker_Index');
             Route::post('search', 'AdminController@postSearch')->name('mailTracker_Search');
             Route::get('clear-search', 'AdminController@clearSearch')->name('mailTracker_ClearSearch');
             Route::get('show-email/{id}', 'AdminController@getShowEmail')->name('mailTracker_ShowEmail');
             Route::get('url-detail/{id}', 'AdminController@getUrlDetail')->name('mailTracker_UrlDetail');
             Route::get('smtp-detail/{id}', 'AdminController@getSmtpDetail')->name('mailTracker_SmtpDetail');
         });
     } else {
         $app = $this->app;
         $app->group($config_admin, function () use($app) {
             $app->get('/', 'AdminController@getIndex')->name('mailTracker_Index');
             $app->post('search', 'AdminController@postSearch')->name('mailTracker_Search');
             $app->get('clear-search', 'AdminController@clearSearch')->name('mailTracker_ClearSearch');
             $app->get('show-email/{id}', 'AdminController@getShowEmail')->name('mailTracker_ShowEmail');
             $app->get('url-detail/{id}', 'AdminController@getUrlDetail')->name('mailTracker_UrlDetail');
             $app->get('smtp-detail/{id}', 'AdminController@getSmtpDetail')->name('mailTracker_SmtpDetail');
         });
     }
 }
示例#22
0
文件: Lara.php 项目: gxela/lararoute
 /**
  * Fill Route Gaps
  *
  * @param string $prefix eg. 'admin'
  * @param string $to_action eg. 'Admin\\DashboardController@get_index'
  * @param Closure
  */
 public static function fillRouteGaps($prefix, $to_action)
 {
     if (!empty($prefix)) {
         if (is_callable($to_action)) {
             Route::get('/', array('as' => $prefix, $to_action));
             Route::get('index', array('as' => $prefix . '.get_index', $to_action));
         } else {
             Route::get('/', array('as' => $prefix, 'uses' => $to_action));
             Route::get('index', array('as' => $prefix . '.get_index', 'uses' => $to_action));
         }
     }
 }
示例#23
0
 public function auth()
 {
     $namespace = "\\CodePress\\CodeUser\\Controllers";
     Route::group(['namespace' => null], function () use($namespace) {
         Route::get('login', "{$namespace}\\Auth\\AuthController@showLoginForm");
         Route::post('login', "{$namespace}\\Auth\\AuthController@login");
         Route::get('logout', "{$namespace}\\Auth\\AuthController@logout");
         Route::get('password/reset/{token?}', "{$namespace}\\Auth\\PasswordController@showResetForm");
         Route::post('password/email', "{$namespace}\\Auth\\PasswordController@sendResetLinkEmail");
         Route::post('password/reset', "{$namespace}\\Auth\\PasswordController@reset");
     });
 }
 /**
  * @param array $tables
  */
 public static function route(array $tables)
 {
     Route::group(Config::get(TableAdmin::PACKAGE_NAME . '::routing'), function () use($tables) {
         $parameters = ['table' => '(' . implode('|', $tables) . ')'];
         $controller = '\\Shin1x1\\LaravelTableAdmin\\Controller\\TableAdminController';
         Route::get('{table}', $controller . '@index')->where($parameters);
         Route::get('{table}/create', $controller . '@create')->where($parameters);
         Route::post('{table}', $controller . '@store')->where($parameters);
         Route::get('{table}/{id}', $controller . '@edit')->where($parameters);
         Route::put('{table}/{id}', $controller . '@update')->where($parameters);
         Route::delete('{table}/{id}', $controller . '@destroy')->where($parameters);
     });
 }
示例#25
0
 public function setUp()
 {
     parent::setUp();
     $this->configureDatabase();
     Route::model('real', 'Propaganistas\\LaravelFakeId\\Tests\\Real');
     Route::fakeIdModel('fake', 'Propaganistas\\LaravelFakeId\\Tests\\Fake');
     Route::get('real/{real}', ['as' => 'real', function ($real) {
         return 'real';
     }]);
     Route::get('fake/{fake}', ['as' => 'fake', function ($fake) {
         return 'fake';
     }]);
 }
 public function setUp()
 {
     parent::setUp();
     Route::get('no_perm', function () {
         return '';
     });
     Route::get('with_perm', ['before' => ["has_perm:{$this->perm_1}"], 'uses' => function () {
         return '';
     }]);
     Route::get('with_perms', ['before' => ["has_perm:{$this->perm_1},{$this->perm_2}"], 'uses' => function () {
         return '';
     }]);
 }
示例#27
0
 private function routes(Router $router)
 {
     $router->middleware('djem.auth', \DJEM\Http\Middleware\Authenticate::class);
     $router->middlewareGroup('djem.web', [\Illuminate\Cookie\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \DJEM\Http\Middleware\VerifyCsrfToken::class]);
     Route::group(['middleware' => ['djem.web', 'djem.auth'], 'namespace' => '\\DJEM\\Http\\Controllers'], function () {
         Route::any('djem/api', 'Api@getState');
         Route::any('djem/api/tree', 'Api\\Main@tree');
         Route::any('djem/api/grid', 'Api\\Main@grid');
         Route::any('djem/api/content/delete', 'Api\\Content@delete');
         Route::any('djem/api/content/load', 'Api\\Content@loadRelation');
         Route::get('djem/api/content', 'Api\\Content@get');
         Route::post('djem/api/content', 'Api\\Content@set');
         Route::get('djem/api/files', 'Api\\Files@get');
         Route::post('djem/api/files/upload', 'Api\\Files@upload');
         Route::post('djem/api/files', 'Api\\Files@set');
     });
     Route::get('djem/{file?}', '\\DJEM\\Http\\Controllers\\StaticFiles@get')->where('file', '.*');
 }
 /**
  * Boot the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->registerTranslations();
     $this->registerConfig();
     $this->registerViews();
     if (cmsinstalled()) {
         if (true || Settings::get('users.users_module_as_home_page')) {
             Route::group(['middleware' => ['web', 'user'], 'namespace' => 'cms\\Modules\\Users\\Http\\Controllers\\Frontend'], function () {
                 Route::get('/', ['as' => 'home', 'uses' => 'UsersController@index']);
             });
         }
         if (Settings::get('users.is_registration_allowed')) {
             Route::group(['middleware' => ['web'], 'as' => 'users.', 'namespace' => 'cms\\Modules\\Users\\Http\\Controllers\\Frontend'], function () {
                 // Registration routes...
                 Route::get('register', ['as' => 'register', 'uses' => 'RegisterController@showRegistrationForm']);
                 Route::post('register', 'RegisterController@register');
                 // Register from social networks
                 Route::get('register/{provider?}', ['uses' => 'RegisterController@getRegisterFromProvider']);
                 Route::post('register/{provider?}', ['uses' => 'RegisterController@postRegisterFromProvider']);
             });
         }
     }
 }
示例#29
0
文件: web.php 项目: GHarutyunyan/cms
    Route::post('/' . config('app.admin_route_name') . '/settings', 'Admin\\SettingsController@index');
    Route::get('/' . config('app.admin_route_name') . '/notifications', 'Admin\\NotificationController@index');
    Route::get('/' . config('app.admin_route_name') . '/notifications/count', 'Admin\\NotificationController@count');
    Route::get('/' . config('app.admin_route_name') . '/notifications/seen', 'Admin\\NotificationController@seen');
    Route::get('/' . config('app.admin_route_name') . '/pages', 'Admin\\PageController@index')->name('pages');
    Route::get('/' . config('app.admin_route_name') . '/page/create', 'Admin\\PageController@create');
    Route::post('/' . config('app.admin_route_name') . '/page/create', 'Admin\\PageController@create');
    Route::get('/' . config('app.admin_route_name') . '/page/edit/{id}', 'Admin\\PageController@edit');
    Route::post('/' . config('app.admin_route_name') . '/page/edit/{id}', 'Admin\\PageController@edit');
    Route::get('/' . config('app.admin_route_name') . '/page/delete/{id}', 'Admin\\PageController@delete');
    Route::post('/' . config('app.admin_route_name') . '/page/delete', 'Admin\\PageController@delete');
    Route::get('/' . config('app.admin_route_name') . '/page/export', 'Admin\\PageController@export');
    Route::get('/' . config('app.admin_route_name') . '/albums', 'Admin\\AlbumController@index')->name('albums');
    Route::get('/' . config('app.admin_route_name') . '/album/create', 'Admin\\AlbumController@create');
    Route::post('/' . config('app.admin_route_name') . '/album/create', 'Admin\\AlbumController@create');
    Route::get('/' . config('app.admin_route_name') . '/album/edit/{id}', 'Admin\\AlbumController@edit');
    Route::post('/' . config('app.admin_route_name') . '/album/edit/{id}', 'Admin\\AlbumController@edit');
    Route::get('/' . config('app.admin_route_name') . '/album/delete/{id}', 'Admin\\AlbumController@delete');
    Route::post('/' . config('app.admin_route_name') . '/album/delete', 'Admin\\AlbumController@delete');
    Route::get('/' . config('app.admin_route_name') . '/album/export', 'Admin\\AlbumController@export');
    Route::get('/' . config('app.admin_route_name') . '/gallery', 'Admin\\GalleryController@index')->name('gallery');
    Route::get('/' . config('app.admin_route_name') . '/gallery/create', 'Admin\\GalleryController@create');
    Route::post('/' . config('app.admin_route_name') . '/gallery/create', 'Admin\\GalleryController@create');
    Route::get('/' . config('app.admin_route_name') . '/gallery/edit/{id}', 'Admin\\GalleryController@edit');
    Route::post('/' . config('app.admin_route_name') . '/gallery/edit/{id}', 'Admin\\GalleryController@edit');
    Route::get('/' . config('app.admin_route_name') . '/gallery/delete/{id}', 'Admin\\GalleryController@delete');
    Route::post('/' . config('app.admin_route_name') . '/gallery/delete', 'Admin\\GalleryController@delete');
    Route::get('/' . config('app.admin_route_name') . '/gallery/approve/{id}', 'Admin\\GalleryController@approve');
    Route::get('/' . config('app.admin_route_name') . '/gallery/disapprove/{id}', 'Admin\\GalleryController@disapprove');
    Route::get('/' . config('app.admin_route_name') . '/gallery/export', 'Admin\\GalleryController@export');
});
示例#30
0
<?php

use App\Product;
use Illuminate\Support\Facades\Route;
Route::group(['prefix' => 'api'], function () {
    Route::get('featured', 'ProductController@featured');
    Route::get('search/{searched}', 'ProductController@search');
    Route::get('product/info/{ids}', 'ProductController@info');
    Route::resource('product', 'ProductController');
    Route::resource('manufacturer', 'ManufacturerController');
});