Skip to content

Commit

Permalink
Merge pull request #3 from patrickbrouwers/develop
Browse files Browse the repository at this point in the history
Move route group logic to core RouteServiceProvider
  • Loading branch information
nWidart committed Feb 11, 2015
2 parents f20e1f4 + 041c015 commit 66b4b97
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 36 deletions.
3 changes: 3 additions & 0 deletions Http/backendRoutes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

$router->get('/', ['as' => 'dashboard.index', 'uses' => 'DashboardController@index']);
9 changes: 0 additions & 9 deletions Http/routes.php

This file was deleted.

37 changes: 10 additions & 27 deletions Providers/RouteServiceProvider.php
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';
}
}

0 comments on commit 66b4b97

Please sign in to comment.