Adding bootstrap/paths.php to allow specification of custom paths for sections of Laravel.
Signed-off-by: Ben Corlett <bencorlett@me.com>
This commit is contained in:
42
bootstrap/paths.php
Normal file
42
bootstrap/paths.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here we just defined the path to the application directory. Most likely
|
||||
| you will never need to change this value as the default setup should
|
||||
| work perfectly fine for the vast majority of all our applications.
|
||||
|
|
||||
*/
|
||||
|
||||
'app' => __DIR__.'/../app',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Public Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| We understand that not all hosting environments allow flexibility with
|
||||
| public paths. That's why we allow you to change where your public path
|
||||
| is below.
|
||||
|
|
||||
*/
|
||||
|
||||
'public' => __DIR__.'/../public',
|
||||
|
||||
/*
|
||||
|-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
| Base Path
|
||||
|-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
|
|
||||
| You probably shouldn't be editing this.
|
||||
|
|
||||
*/
|
||||
|
||||
'base' => __DIR__.'/..',
|
||||
|
||||
);
|
||||
@@ -15,18 +15,21 @@ $app = new Illuminate\Foundation\Application;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Define The Application Path
|
||||
| Bind Paths
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here we just defined the path to the application directory. Most likely
|
||||
| you will never need to change this value as the default setup should
|
||||
| work perfectly fine for the vast majority of all our applications.
|
||||
| Here we are binding the paths configured in paths.php to the app. You
|
||||
| should not be changing these here but rather in paths.php.
|
||||
|
|
||||
*/
|
||||
|
||||
$app->instance('path', $appPath = __DIR__.'/../app');
|
||||
$paths = require __DIR__.'/paths.php';
|
||||
|
||||
$app->instance('path.base', __DIR__.'/..');
|
||||
$app->instance('path', $appPath = $paths['app']);
|
||||
|
||||
$app->instance('path.base', $paths['base']);
|
||||
|
||||
$app->instance('path.public', $paths['public']);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user