Embrace contracts.

This commit is contained in:
Taylor Otwell
2014-09-18 19:35:08 -05:00
parent 7c8b8e7dba
commit 4e5a151774
3 changed files with 16 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
<?php namespace App\Providers;
use App, URL;
use Illuminate\Contracts\Routing\UrlGenerator;
use Illuminate\Routing\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider {
@@ -10,11 +10,12 @@ class RouteServiceProvider extends ServiceProvider {
*
* Register any model bindings or pattern based filters.
*
* @param UrlGenerator $url
* @return void
*/
public function before()
public function before(UrlGenerator $url)
{
URL::setRootControllerNamespace(
$url->setRootControllerNamespace(
trim(config('namespaces.controllers'), '\\')
);
}
@@ -26,7 +27,7 @@ class RouteServiceProvider extends ServiceProvider {
*/
public function map()
{
App::booted(function()
$this->app->booted(function()
{
// Once the application has booted, we will include the default routes
// file. This "namespace" helper will load the routes file within a