Commit 9f81d4df authored by Taylor Otwell's avatar Taylor Otwell

Simplify things.

parent cd37f40b
......@@ -17,9 +17,7 @@ class RouteServiceProvider extends ServiceProvider {
*/
public function before(Router $router, UrlGenerator $url)
{
$url->setRootControllerNamespace(
trim(config('namespaces.controllers'), '\\')
);
$url->setRootControllerNamespace('App\Http\Controllers');
}
/**
......@@ -29,12 +27,12 @@ class RouteServiceProvider extends ServiceProvider {
*/
public function map()
{
// Once the application has booted, we will include the default routes
// file. This "namespace" helper will load the routes file within a
// route group which automatically sets the controller namespace.
$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
// route group which automatically sets the controller namespace.
$this->namespaced(function(Router $router)
$this->namespaced('App\Http\Controllers', function(Router $router)
{
require app_path().'/Http/routes.php';
});
......
......@@ -17,61 +17,80 @@ return [
/*
|--------------------------------------------------------------------------
| Public Path
| Base Path
|--------------------------------------------------------------------------
|
| The public path contains the assets for your web application, such as
| your JavaScript and CSS files, and also contains the primary entry
| point for web requests into these applications from the outside.
| The base path is the root of the Laravel installation. Most likely you
| will not need to change this value. But, if for some wild reason it
| is necessary you will do so here, just proceed with some caution.
|
*/
'public' => __DIR__.'/../public',
'base' => __DIR__.'/..',
/*
|--------------------------------------------------------------------------
| Base Path
| Configuration Path
|--------------------------------------------------------------------------
|
| The base path is the root of the Laravel installation. Most likely you
| will not need to change this value. But, if for some wild reason it
| is necessary you will do so here, just proceed with some caution.
| This path is used by the configuration loader to load the application
| configuration files. In general, you should'nt need to change this
| value; however, you can theoretically change the path from here.
|
*/
'base' => __DIR__.'/..',
'config' => __DIR__.'/../config',
/*
|--------------------------------------------------------------------------
| Storage Path
| Database Path
|--------------------------------------------------------------------------
|
| The storage path is used by Laravel to store cached Blade views, logs
| and other pieces of information. You may modify the path here when
| you want to change the location of this directory for your apps.
| This path is used by the migration generator and migration runner to
| know where to place your fresh database migration classes. You're
| free to modify the path but you probably will not ever need to.
|
*/
'storage' => __DIR__.'/../storage',
'database' => __DIR__.'/../database',
/*
|--------------------------------------------------------------------------
| Generator Paths
| Language Path
|--------------------------------------------------------------------------
|
| These paths are used by the various class generators and other pieces
| of the framework that need to determine where to store these types
| of classes. Of course, they may be changed to any path you wish.
| This path is used by the language file loader to load your application
| language files. The purpose of these files is to store your strings
| that are translated into other languages for views, e-mails, etc.
|
*/
'console' => __DIR__.'/../app/Console',
'config' => __DIR__.'/../config',
'controllers' => __DIR__.'/../app/Http/Controllers',
'database' => __DIR__.'/../database',
'filters' => __DIR__.'/../app/Http/Filters',
'lang' => __DIR__.'/../resources/lang',
'providers' => __DIR__.'/../app/Providers',
'requests' => __DIR__.'/../app/Http/Requests',
/*
|--------------------------------------------------------------------------
| Public Path
|--------------------------------------------------------------------------
|
| The public path contains the assets for your web application, such as
| your JavaScript and CSS files, and also contains the primary entry
| point for web requests into these applications from the outside.
|
*/
'public' => __DIR__.'/../public',
/*
|--------------------------------------------------------------------------
| Storage Path
|--------------------------------------------------------------------------
|
| The storage path is used by Laravel to store cached Blade views, logs
| and other pieces of information. You may modify the path here when
| you want to change the location of this directory for your apps.
|
*/
'storage' => __DIR__.'/../storage',
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Application Namespace
|--------------------------------------------------------------------------
|
| This is the root namespace used by the various Laravel generator tasks
| that are able to build controllers, console commands and many other
| classes for you. You may set the name via the "app:name" command.
|
*/
'root' => 'App\\',
/*
|--------------------------------------------------------------------------
| Generator Namespaces
|--------------------------------------------------------------------------
|
| These namespaces are utilized by the various class generator Artisan
| commands. You are free to change them to whatever you wish or not
| at all. The "app:name" command is the easiest way to set these.
|
*/
'console' => 'App\Console\\',
'controllers' => 'App\Http\Controllers\\',
'filters' => 'App\Http\Filters\\',
'providers' => 'App\Providers\\',
'requests' => 'App\Http\Requests\\',
];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment