<?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();
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(); // testing } else { return $app; }