-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from patrickbrouwers/develop
Move route group logic to core RouteServiceProvider
- Loading branch information
Showing
3 changed files
with
13 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
|
||
$router->get('/', ['as' => 'dashboard.index', 'uses' => 'DashboardController@index']); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,29 @@ | ||
<?php namespace Modules\Dashboard\Providers; | ||
|
||
use Illuminate\Routing\Router; | ||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; | ||
use Modules\Core\Providers\RoutingServiceProvider as CoreRoutingServiceProvider; | ||
|
||
class RouteServiceProvider extends CoreRoutingServiceProvider { | ||
|
||
class RouteServiceProvider extends ServiceProvider | ||
{ | ||
/** | ||
* The root namespace to assume when generating URLs to actions. | ||
* | ||
* @var string | ||
*/ | ||
protected $rootUrlNamespace = 'Modules\Dashboard\Http\Controllers'; | ||
|
||
/** | ||
* The controllers to scan for route annotations. | ||
* | ||
* @var array | ||
*/ | ||
protected $scan = [ | ||
'Modules\Dashboard\Http\Controllers', | ||
]; | ||
protected $namespace = 'Modules\Dashboard\Http\Controllers'; | ||
|
||
/** | ||
* Called before routes are registered. | ||
* | ||
* Register any model bindings or pattern based filters. | ||
* | ||
* @param Router $router | ||
* @return void | ||
* @return string | ||
*/ | ||
public function before(Router $router) | ||
protected function getFrontendRoute() | ||
{ | ||
// | ||
return false; | ||
} | ||
|
||
/** | ||
* Define the routes for the application. | ||
* | ||
* @return void | ||
* @return string | ||
*/ | ||
public function map(Router $router) | ||
protected function getBackendRoute() | ||
{ | ||
require __DIR__.'/../Http/routes.php'; | ||
return __DIR__ . '/../Http/backendRoutes.php'; | ||
} | ||
} |