merge paths into a single place.
This commit is contained in:
parent
6e120eeeae
commit
db24d77e1e
37
artisan
37
artisan
|
@ -1,42 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* Laravel (CLI) - A Command Line For Web Artisans
|
|
||||||
*
|
|
||||||
* @package Laravel
|
|
||||||
* @version 2.2.0 (Beta 1)
|
|
||||||
* @author Taylor Otwell <taylorotwell@gmail.com>
|
|
||||||
* @link http://laravel.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
// Define the directory separator for the environment.
|
// Set the core Laravel path constants.
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
define('DS', DIRECTORY_SEPARATOR);
|
require 'paths.php';
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
// The path to the application directory.
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
define('APP_PATH', realpath('application').'/');
|
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
// The path to the bundles directory.
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
define('BUNDLE_PATH', realpath('bundles').'/');
|
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
// The path to the storage directory.
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
define('STORAGE_PATH', realpath('storage').'/');
|
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
// The path to the Laravel directory.
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
define('SYS_PATH', realpath('laravel').'/');
|
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
// The path to the public directory.
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
define('PUBLIC_PATH', realpath('public').'/');
|
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
// Bootstrap the Laravel core.
|
// Bootstrap the Laravel core.
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
// Initialize the web variable if it doesn't exist.
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
if ( ! isset($web)) $web = false;
|
||||||
|
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
// Define the directory separator for the environment.
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
define('DS', DIRECTORY_SEPARATOR);
|
||||||
|
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
// The path to the application directory.
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
$paths['APP_PATH'] = 'application';
|
||||||
|
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
// The path to the bundles directory.
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
$paths['BUNDLE_PATH'] = 'bundles';
|
||||||
|
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
// The path to the storage directory.
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
$paths['STORAGE_PATH'] = 'storage';
|
||||||
|
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
// The path to the Laravel directory.
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
$paths['SYS_PATH'] = 'laravel';
|
||||||
|
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
// The path to the public directory.
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
if ($web)
|
||||||
|
{
|
||||||
|
define('PUBLIC_PATH', realpath('').DS);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$paths['PUBLIC_PATH'] = 'public';
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
// Define each constant if it hasn't been defined.
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
foreach ($paths as $name => $path)
|
||||||
|
{
|
||||||
|
if ( ! defined($name))
|
||||||
|
{
|
||||||
|
$path = ($web) ? '../'.$path : $path;
|
||||||
|
|
||||||
|
define($name, realpath($path).DS);
|
||||||
|
}
|
||||||
|
}
|
|
@ -14,34 +14,19 @@
|
||||||
define('LARAVEL_START', microtime(true));
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
// Define the directory separator for the environment.
|
// Indicate that the request is from the web.
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
define('DS', DIRECTORY_SEPARATOR);
|
$web = true;
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
// The path to the application directory.
|
// Set the core Laravel path constants.
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
define('APP_PATH', realpath('../application').DS);
|
require '../paths.php';
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
// The path to the bundles directory.
|
// Unset the temporary web variable.
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
define('BUNDLE_PATH', realpath('../bundles').DS);
|
unset($web);
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
// The path to the storage directory.
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
define('STORAGE_PATH', realpath('../storage').DS);
|
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
// The path to the Laravel directory.
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
define('SYS_PATH', realpath('../laravel').DS);
|
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
// The path to the public directory.
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
define('PUBLIC_PATH', realpath(__DIR__).DS);
|
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
// Launch Laravel.
|
// Launch Laravel.
|
||||||
|
|
Loading…
Reference in New Issue