Esempio n. 1
0
 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  *
  * @return void
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['web', 'ready']], function (Registrar $router) {
         $router->get('/atom/{component_group?}', ['as' => 'feed.atom', 'uses' => 'FeedController@atomAction']);
         $router->get('/rss/{component_group?}', ['as' => 'feed.rss', 'uses' => 'FeedController@rssAction']);
     });
 }
Esempio n. 2
0
 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => 'app.isSetup'], function ($router) {
         $router->get('/', ['as' => 'status-page', 'uses' => 'StatusPageController@showIndex']);
         $router->get('incident/{incident}', ['as' => 'incident', 'uses' => 'StatusPageController@showIncident']);
     });
 }
Esempio n. 3
0
 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['app.hasSetting', 'localize'], 'setting' => 'app_name'], function ($router) {
         $router->get('/', ['as' => 'status-page', 'uses' => 'StatusPageController@showIndex']);
         $router->get('incident/{incident}', ['as' => 'incident', 'uses' => 'StatusPageController@showIncident']);
     });
 }
Esempio n. 4
0
 public function map(Registrar $router)
 {
     $router->group(['prefix' => 'test'], function ($router) {
         $router->get('/', ['uses' => 'TestController@test']);
         $router->get('/queue', ['uses' => 'TestController@queue']);
     });
 }
Esempio n. 5
0
 /**
  * Define the signup routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  *
  * @return void
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['web', 'ready', 'guest'], 'as' => 'signup.'], function (Registrar $router) {
         $router->get('signup/invite/{code}', ['as' => 'invite', 'uses' => 'SignupController@getSignup']);
         $router->post('signup/invite/{code}', ['uses' => 'SignupController@postSignup']);
     });
 }
Esempio n. 6
0
 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['web', 'app.hasSetting'], 'setting' => 'app_name'], function ($router) {
         $router->get('/atom/{component_group?}', ['as' => 'feed.atom', 'uses' => 'FeedController@atomAction']);
         $router->get('/rss/{component_group?}', ['as' => 'feed.rss', 'uses' => 'FeedController@rssAction']);
     });
 }
Esempio n. 7
0
 /**
  * Define the signup routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['app.hasSetting', 'guest'], 'setting' => 'app_name', 'as' => 'signup.'], function ($router) {
         $router->get('signup/invite/{code}', ['as' => 'invite', 'uses' => 'SignupController@getSignup']);
         $router->post('signup/invite/{code}', ['uses' => 'SignupController@postSignup']);
     });
 }
Esempio n. 8
0
 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     // Prevent access until the app is setup.
     $router->group(['middleware' => 'app.hasSetting', 'setting' => 'app_name'], function ($router) {
         $router->get('/', ['as' => 'status-page', 'uses' => 'HomeController@showIndex']);
     });
 }
 public function bind(Registrar $router)
 {
     $router->group(['prefix' => 'admin', 'namespace' => 'App\\Http\\Admin\\Controllers', 'middleware' => ['web', 'guest'], 'category' => 'Sentinel'], function (Registrar $sentinel) {
         $sentinel->get('dashboard', ['as' => 'admin.dashboard', 'uses' => 'Controller@index']);
         $sentinel->get('account/user', ['as' => 'admin.account.user', 'uses' => 'Sentinel\\AccountController@editAccountUser']);
         $sentinel->post('account/user-info/update', ['as' => 'admin.account.user.update', 'uses' => 'Sentinel\\AccountController@updateAccountUser']);
         $sentinel->get('account/person', ['as' => 'admin.account.person', 'uses' => 'Sentinel\\AccountController@editAccountPerson']);
         $sentinel->post('account/personal-info/update', ['as' => 'admin.account.person.update', 'uses' => 'Sentinel\\AccountController@updateAccountPerson']);
         $sentinel->get('system', ['as' => 'admin.settings.user.system', 'uses' => 'Sentinel\\AccountController@editSystem']);
         $sentinel->post('system/update', ['as' => 'admin.settings.user.system.update', 'uses' => 'Sentinel\\AccountController@updateSystem']);
     });
     $router->group(['prefix' => 'admin', 'namespace' => 'App\\Http\\Admin\\Controllers\\Sentinel', 'middleware' => ['web', 'guest', 'backendPermissions'], 'category' => 'Sentinel'], function (Registrar $sentinel) {
         $sentinel->resource('user', 'UserController');
         $sentinel->put('user/{userId}/restore', ['as' => 'admin.user.delete.restore', 'uses' => 'UserController@restore']);
         $sentinel->put('user/{userId}/activate', ['as' => 'admin.user.edit.activate', 'uses' => 'UserController@activate']);
         $sentinel->put('user/{userId}/deactivate', ['as' => 'admin.user.edit.deactivate', 'uses' => 'UserController@deactivate']);
         $sentinel->resource('group', 'GroupController');
         $sentinel->get('group/{group}/members', ['as' => 'admin.group.edit.members', 'uses' => 'GroupController@editMembers']);
         $sentinel->post('group/{group}/attach/{user}', ['as' => 'admin.group.add.attach', 'uses' => 'GroupController@attach']);
         $sentinel->delete('group/{group}/detach/{user}', ['as' => 'admin.group.delete.detach', 'uses' => 'GroupController@detach']);
     });
     $router->group(['prefix' => 'admin', 'namespace' => 'App\\Http\\Admin\\Controllers\\Sentinel', 'middleware' => ['web', 'guest'], 'category' => 'Sentinel'], function (Registrar $manager) {
         $manager->get('user/{user}/permissions/edit', ['as' => 'admin.user.permission.edit', 'uses' => 'PermissionController@edit']);
         $manager->post('user/{user}/{permission_type}/edit', ['as' => 'admin.user.permission.update', 'uses' => 'PermissionController@update']);
         $manager->get('group/{group}/permissions/edit', ['as' => 'admin.group.permission.edit', 'uses' => 'PermissionController@edit']);
         $manager->post('group/{group}/{permission_type}/edit', ['as' => 'admin.group.permission.update', 'uses' => 'PermissionController@update']);
         $manager->post('user/{user}/{permission_type}/toggle', ['as' => 'admin.user.permission.toggle', 'uses' => 'PermissionController@toggle']);
         $manager->post('group/{group}/{permission_type}/toggle', ['as' => 'admin.group.permission.toggle', 'uses' => 'PermissionController@toggle']);
     });
 }
Esempio n. 10
0
 /**
  * Define the groups routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     // Project Sub-routes groups.group_show, groups.group_edit
     $router->group(['middleware' => ['app.hasSetting', 'auth'], 'setting' => 'app_name', 'as' => 'owners.'], function ($router) {
         $router->get('{owner_path}', ['as' => 'owner_show', 'uses' => 'OwnersController@showAction'])->where('owner_path', '[a-zA-z.0-9_\\-]+');
     });
 }
Esempio n. 11
0
 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  *
  * @return void
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['web', 'ready', 'localize']], function ($router) {
         $router->get('/', ['as' => 'status-page', 'uses' => 'StatusPageController@showIndex']);
         $router->get('incident/{incident}', ['as' => 'incident', 'uses' => 'StatusPageController@showIncident']);
     });
 }
 /**
  * Define the routes for the application.
  *
  * @param  \Illuminate\Contracts\Routing\Registrar  $router
  */
 public function map(Router $router)
 {
     if ($this->isEnabled()) {
         $router->group($this->routeAttributes(), function (Router $router) {
             LogViewerRoute::register($router);
         });
     }
 }
Esempio n. 13
0
 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     // Prevent access until the app is setup.
     $router->group(['middleware' => 'app.hasSetting', 'setting' => 'app_name'], function ($router) {
         $router->get('/atom/{component_group?}', 'AtomController@feedAction');
         $router->get('/rss/{component_group?}', 'RssController@feedAction');
     });
 }
Esempio n. 14
0
 /**
  * Called before any commands or requests are run.
  *
  * @param Config $config
  * @param ValidatorFactory $validator
  * @param Router $router
  */
 public function boot(Config $config, ValidatorFactory $validator, Router $router)
 {
     $this->publishes([__DIR__ . '/../config/mongodb.php' => config_path('mongodb.php')]);
     $validator->extend('mongo_unique', 'Atrauzzi\\LaravelMongodb\\ValidationRule\\Unique@validate');
     $validator->extend('mongo_exists', 'Atrauzzi\\LaravelMongodb\\ValidationRule\\Exists@validate');
     // ToDo: Convert this to Laravel 5 middleware?
     $router->after('Atrauzzi\\LaravelMongodb\\ShutdownHandler');
 }
Esempio n. 15
0
 /**
  * Define the feed routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     // Prevent access until the app is setup.
     $router->group(['middleware' => 'app.hasSetting', 'setting' => 'app_name'], function ($router) {
         $router->get('/atom/{project_group?}', ['as' => 'feed.atom', 'uses' => 'FeedController@atomAction']);
         $router->get('/rss/{project_group?}', ['as' => 'feed.rss', 'uses' => 'FeedController@rssAction']);
     });
 }
Esempio n. 16
0
 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     // Prevent access until the app is setup.
     $router->group(['middleware' => 'app.isSetup'], function ($router) {
         $router->get('/atom/{component_group?}', ['as' => 'feed.atom', 'uses' => 'AtomController@feedAction']);
         $router->get('/rss/{component_group?}', ['as' => 'feed.rss', 'uses' => 'RssController@feedAction']);
     });
 }
Esempio n. 17
0
 /**
  * Define the foundation routes for the application.
  *
  * @param  \Illuminate\Contracts\Routing\Registrar  $router
  */
 private function mapBackEndRoutes(Router $router)
 {
     $attributes = array_merge($this->getFoundationRouteGroup(), ['as' => 'pages::foundation.', 'namespace' => 'Arcanesoft\\Pages\\Http\\Controllers\\Back']);
     $router->group(array_merge($attributes, ['prefix' => $this->getFoundationPagesPrefix()]), function (Router $router) {
         Routes\Back\StatsRoutes::register($router);
         Routes\Back\PagesRoutes::register($router);
     });
 }
Esempio n. 18
0
 /**
  * Define the auth routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['as' => 'auth.', 'middleware' => 'app.hasSetting', 'prefix' => 'auth', 'setting' => 'app_name'], function ($router) {
         $router->get('login', ['middleware' => 'guest', 'as' => 'login', 'uses' => 'AuthController@loginAction']);
         $router->post('login', ['middleware' => ['guest', 'csrf'], 'uses' => 'AuthController@loginPost']);
         $router->get('logout', ['as' => 'logout', 'uses' => 'AuthController@logoutAction', 'middleware' => 'auth']);
     });
 }
 /**
  * Define the routes for the application.
  *
  * @param  \Illuminate\Contracts\Routing\Registrar  $router
  */
 public function map(Router $router)
 {
     $router->group($this->getFoundationRouteGroup(), function (Router $router) {
         Routes\DashboardRoute::register($router);
         Routes\SettingsRoutes::register($router);
         Routes\SystemRoutes::register($router);
     });
 }
Esempio n. 20
0
 /**
  * Define the auth routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['as' => 'auth.', 'namespace' => 'Auth', 'prefix' => 'auth'], function (Registrar $router) {
         // Login routes
         $router->get('login', ['middleware' => 'guest', 'as' => 'login', 'uses' => 'AuthController@showLogin']);
         $router->get('youtube', ['middleware' => 'guest', 'as' => 'login', 'uses' => 'AuthController@postLogin']);
         $router->get('logout', ['as' => 'logout', 'uses' => 'AuthController@logoutAction']);
     });
 }
Esempio n. 21
0
 /**
  * Load routes for active modules
  *
  * @param Registrar $router
  * @param string|null $type
  */
 public function loadRoutes(Registrar $router, $type = null)
 {
     $this->withRoutes($type)->each(function ($module) use($router, $type) {
         /* @var Module $module */
         $router->group(['namespace' => $module->routingControllerNamespace()], function ($router) use($module, $type) {
             $this->app['files']->getRequire($this->app->basePath() . DIRECTORY_SEPARATOR . $module->routesFilePath($module->routePrefix(compact('type'))));
         });
     });
 }
 /**
  * Map the admin routes.
  *
  * @param  \Illuminate\Contracts\Routing\Registrar  $router
  */
 private function mapAdminRoutes(Router $router)
 {
     $attributes = array_merge($this->getFoundationRouteGroup(), ['as' => 'admin::foundation.', 'namespace' => 'Arcanesoft\\Foundation\\Http\\Controllers\\Admin']);
     $router->group($attributes, function (Router $router) {
         Routes\Admin\DashboardRoute::register($router);
         Routes\Admin\SettingsRoutes::register($router);
         Routes\Admin\SystemRoutes::register($router);
     });
 }
Esempio n. 23
0
 /**
  * Define the home routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->get('/', function () {
         $gc = app('Playlister\\Services\\YoutubeAPI\\YoutubeAPI')->getClient();
         $playlists = new \Google_Service_YouTube($gc);
         dd($playlists->playlists->listPlaylists('contentDetails,snippet', ['mine' => true]));
         return view('welcome');
     });
 }
Esempio n. 24
0
 /**
  * @param Registrar $router
  *
  * @return void
  */
 public function routes(Registrar $router, Manager $resourceManager)
 {
     /** @var MenuManager $menuManager */
     $menuManager = $this->app->make(MenuManager::class);
     $router->group(['prefix' => 'file-manager'], function (Registrar $router) use($resourceManager, $menuManager) {
         // Register Resource
         $resourceManager->bind($router, FileResource::class, $this);
     });
 }
Esempio n. 25
0
 /**
  * Define the foundation routes for the application.
  *
  * @param  \Illuminate\Contracts\Routing\Registrar  $router
  */
 private function mapFoundationRoutes(Router $router)
 {
     $attributes = array_merge($this->getFoundationRouteGroup(), ['as' => 'blog::foundation.', 'namespace' => 'Arcanesoft\\Blog\\Http\\Controllers\\Foundation']);
     $router->group(array_merge($attributes, ['prefix' => $this->getFoundationBlogPrefix()]), function (Router $router) {
         Routes\Foundation\StatsRoutes::register($router);
         Routes\Foundation\PostsRoutes::register($router);
         Routes\Foundation\CommentsRoutes::register($router);
         Routes\Foundation\CategoriesRoutes::register($router);
         Routes\Foundation\TagsRoutes::register($router);
     });
 }
Esempio n. 26
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next, $redirect = '/')
 {
     $world = $this->router->getCurrentRoute()->getParameter('world');
     if (worlds()->count() > 1 and !$world) {
         if ($request->ajax()) {
             return response('Unauthorized.', 401);
         } else {
             return redirect($redirect);
         }
     }
     return $next($request);
 }
Esempio n. 27
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     $player = $this->router->getCurrentRoute()->getParameter('player');
     if (!$player or $player->isDeleted()) {
         if ($request->ajax()) {
             return response('Unauthorized.', 401);
         } else {
             throw new NotDeletedPlayerException();
         }
     }
     return $next($request);
 }
Esempio n. 28
0
 /**
  * Bootstrap the application services.
  *
  * @return void
  */
 public function boot(Registrar $router)
 {
     // Register the default route for images
     $router->get('img/{path}', function (Request $request, Server $glide) {
         return $glide->getImageResponse($request->getPathInfo(), $request->all());
     })->where('path', '.+');
     // match all routes where path starts with img/
     // configuration file
     $this->publishes([__DIR__ . '/../config/images.php' => config_path('images.php')], 'config');
     // default images
     $this->publishes([__DIR__ . '/../storage/' => storage_path('app/images')], 'images');
 }
Esempio n. 29
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     $player = $this->router->getCurrentRoute()->getParameter('player');
     $player->load('account');
     if (!$this->auth->check() or !$player or $this->auth->id() !== $player->account->id()) {
         if ($request->ajax()) {
             return response('Unauthorized.', 401);
         } else {
             throw new DifferentAccountPlayerException();
         }
     }
     return $next($request);
 }
Esempio n. 30
0
 /**
  * Define the auth routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  *
  * @return void
  */
 public function map(Registrar $router)
 {
     $router->group(['as' => 'auth.', 'middleware' => ['web'], 'prefix' => 'auth', 'namespace' => 'Auth'], function (Registrar $router) {
         $router->get('login', ['middleware' => 'guest', 'as' => 'login', 'uses' => 'AuthController@getLogin']);
         $router->post('login', ['middleware' => ['guest'], 'uses' => 'AuthController@postLogin']);
         $router->get('logout', ['as' => 'logout', 'uses' => 'AuthController@getLogout', 'middleware' => 'auth']);
         $router->get('register', ['middleware' => 'guest', 'as' => 'register', 'uses' => 'AuthController@getRegister']);
         $router->post('register', ['middleware' => ['guest'], 'uses' => 'AuthController@postRegister']);
         $router->get('landing', ['middleware' => 'guest', 'as' => 'landing', 'uses' => 'AuthController@landing']);
         $router->get('{provider}', 'AuthController@provider');
         $router->get('{provider}/callback', 'AuthController@callback');
     });
 }