<?php !defined('BASEPATH') && define('BASEPATH', __DIR__ . '/../../laravel'); !defined('APPPATH') && define('APPPATH', __DIR__ . '/../app'); define('LARAVEL_START', microtime(true)); require BASEPATH . '/vendor/autoload.php'; if (file_exists($compiled = BASEPATH . '/start/compiled.php')) { require $compiled; } Patchwork\Utf8\Bootup::initMbstring(); Illuminate\Support\ClassLoader::register(); if (is_dir($workbench = __DIR__ . '/../workbench')) { Illuminate\Workbench\Starter::start($workbench); } $app = new Illuminate\Foundation\Application(); $env = $app->detectEnvironment(array('local' => array('homestead'))); $app->bindInstallPaths(array('app' => APPPATH, 'public' => __DIR__, 'base' => BASEPATH, 'storage' => APPPATH . '/storage')); $framework = $app['path.base'] . '/vendor/laravel/framework/src'; require $framework . '/Illuminate/Foundation/start.php'; !isset($artisan) && $app->run();
| so you can just specify a machine name or HTTP host that matches a | given environment, then we will automatically detect it for you. | */ $env = $app->detectEnvironment(array('local' => array('localhost/snipe'), 'staging' => array('staging.yourserver.com'), 'production' => array('localhost/snipe'))); /* |-------------------------------------------------------------------------- | Bind Paths |-------------------------------------------------------------------------- | | Here we are binding the paths configured in paths.php to the app. You | should not be changing these here. If you need to change these you | may do so within the paths.php file and they will be bound here. | */ $app->bindInstallPaths(require __DIR__ . '/paths.php'); /* |-------------------------------------------------------------------------- | Load The Application |-------------------------------------------------------------------------- | | Here we will load the Illuminate application. We'll keep this is in a | separate location so we can isolate the creation of an application | from the actual running of the application with a given request. | */ $framework = $app['path.base'] . '/vendor/laravel/framework/src'; require $framework . '/Illuminate/Foundation/start.php'; /* |-------------------------------------------------------------------------- | Return The Application
Patchwork\Utf8\Bootup::initMbstring(); // register The Laravel Auto Loader Illuminate\Support\ClassLoader::register(); // register The Workbench Loaders if (is_dir($workbench = __DIR__ . '/../workbench')) { Illuminate\Workbench\Starter::start($workbench); } // ex-start.php // ---------------------------------------------------------- // new Laravel application instance $app = new Illuminate\Foundation\Application(); $env = $app->detectEnvironment(function () { return ENVIRONMENT; }); // binding the paths configured in paths.php $app->bindInstallPaths(['app' => APP_PATH, 'base' => APP_PATH, 'public' => ROOT_PATH . '/public', 'storage' => TEMP_PATH]); // load the Illuminate application: $framework = VENDOR_PATH . 'laravel/framework/src'; require $framework . '/Illuminate/Foundation/start.php'; // global functions / objects // ========================================================= $GLOBALS['translate'] = new \Yeb\Laravel\Translate(); function __($text) { return vsprintf($GLOBALS['translate']->zendTranslate->translate($text), array_slice(func_get_args(), 1)); } // run laravel app: ex-index.php // ========================================================= if (!defined('ARTISAN') and !defined('TESTING')) { $app->run(); $app->shutdown();