Skip to content

Commit 9f81d4d

Browse files
committed
Simplify things.
1 parent cd37f40 commit 9f81d4d

File tree

3 files changed

+50
-72
lines changed

3 files changed

+50
-72
lines changed

app/Providers/RouteServiceProvider.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ class RouteServiceProvider extends ServiceProvider {
1717
*/
1818
public function before(Router $router, UrlGenerator $url)
1919
{
20-
$url->setRootControllerNamespace(
21-
trim(config('namespaces.controllers'), '\\')
22-
);
20+
$url->setRootControllerNamespace('App\Http\Controllers');
2321
}
2422

2523
/**
@@ -29,12 +27,12 @@ public function before(Router $router, UrlGenerator $url)
2927
*/
3028
public function map()
3129
{
30+
// Once the application has booted, we will include the default routes
31+
// file. This "namespace" helper will load the routes file within a
32+
// route group which automatically sets the controller namespace.
3233
$this->app->booted(function()
3334
{
34-
// Once the application has booted, we will include the default routes
35-
// file. This "namespace" helper will load the routes file within a
36-
// route group which automatically sets the controller namespace.
37-
$this->namespaced(function(Router $router)
35+
$this->namespaced('App\Http\Controllers', function(Router $router)
3836
{
3937
require app_path().'/Http/routes.php';
4038
});

bootstrap/paths.php

Lines changed: 45 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,61 +17,80 @@
1717

1818
/*
1919
|--------------------------------------------------------------------------
20-
| Public Path
20+
| Base Path
2121
|--------------------------------------------------------------------------
2222
|
23-
| The public path contains the assets for your web application, such as
24-
| your JavaScript and CSS files, and also contains the primary entry
25-
| point for web requests into these applications from the outside.
23+
| The base path is the root of the Laravel installation. Most likely you
24+
| will not need to change this value. But, if for some wild reason it
25+
| is necessary you will do so here, just proceed with some caution.
2626
|
2727
*/
2828

29-
'public' => __DIR__.'/../public',
29+
'base' => __DIR__.'/..',
3030

3131
/*
3232
|--------------------------------------------------------------------------
33-
| Base Path
33+
| Configuration Path
3434
|--------------------------------------------------------------------------
3535
|
36-
| The base path is the root of the Laravel installation. Most likely you
37-
| will not need to change this value. But, if for some wild reason it
38-
| is necessary you will do so here, just proceed with some caution.
36+
| This path is used by the configuration loader to load the application
37+
| configuration files. In general, you should'nt need to change this
38+
| value; however, you can theoretically change the path from here.
3939
|
4040
*/
4141

42-
'base' => __DIR__.'/..',
42+
'config' => __DIR__.'/../config',
4343

4444
/*
4545
|--------------------------------------------------------------------------
46-
| Storage Path
46+
| Database Path
4747
|--------------------------------------------------------------------------
4848
|
49-
| The storage path is used by Laravel to store cached Blade views, logs
50-
| and other pieces of information. You may modify the path here when
51-
| you want to change the location of this directory for your apps.
49+
| This path is used by the migration generator and migration runner to
50+
| know where to place your fresh database migration classes. You're
51+
| free to modify the path but you probably will not ever need to.
5252
|
5353
*/
5454

55-
'storage' => __DIR__.'/../storage',
55+
'database' => __DIR__.'/../database',
5656

5757
/*
5858
|--------------------------------------------------------------------------
59-
| Generator Paths
59+
| Language Path
6060
|--------------------------------------------------------------------------
6161
|
62-
| These paths are used by the various class generators and other pieces
63-
| of the framework that need to determine where to store these types
64-
| of classes. Of course, they may be changed to any path you wish.
62+
| This path is used by the language file loader to load your application
63+
| language files. The purpose of these files is to store your strings
64+
| that are translated into other languages for views, e-mails, etc.
6565
|
6666
*/
6767

68-
'console' => __DIR__.'/../app/Console',
69-
'config' => __DIR__.'/../config',
70-
'controllers' => __DIR__.'/../app/Http/Controllers',
71-
'database' => __DIR__.'/../database',
72-
'filters' => __DIR__.'/../app/Http/Filters',
7368
'lang' => __DIR__.'/../resources/lang',
74-
'providers' => __DIR__.'/../app/Providers',
75-
'requests' => __DIR__.'/../app/Http/Requests',
69+
70+
/*
71+
|--------------------------------------------------------------------------
72+
| Public Path
73+
|--------------------------------------------------------------------------
74+
|
75+
| The public path contains the assets for your web application, such as
76+
| your JavaScript and CSS files, and also contains the primary entry
77+
| point for web requests into these applications from the outside.
78+
|
79+
*/
80+
81+
'public' => __DIR__.'/../public',
82+
83+
/*
84+
|--------------------------------------------------------------------------
85+
| Storage Path
86+
|--------------------------------------------------------------------------
87+
|
88+
| The storage path is used by Laravel to store cached Blade views, logs
89+
| and other pieces of information. You may modify the path here when
90+
| you want to change the location of this directory for your apps.
91+
|
92+
*/
93+
94+
'storage' => __DIR__.'/../storage',
7695

7796
];

config/namespaces.php

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)