// Enable HTTP Method Override //-------------------------------------------------------------------------- Request::enableHttpMethodParameterOverride(); //-------------------------------------------------------------------------- // Enable Trusting Of X-Sendfile Type Header //-------------------------------------------------------------------------- BinaryFileResponse::trustXSendfileTypeHeader(); //-------------------------------------------------------------------------- // Register The Core Service Providers //-------------------------------------------------------------------------- $providers = $config['providers']; $app->getProviderRepository()->load($app, $providers); //-------------------------------------------------------------------------- // Additional Middleware On Application //-------------------------------------------------------------------------- App::middleware('Shared\\Http\\ContentGuard', array($app['config']['app.debug'])); //-------------------------------------------------------------------------- // Register Booted Start Files //-------------------------------------------------------------------------- $app->booted(function () use($app, $env) { //-------------------------------------------------------------------------- // Intialize The Language API //-------------------------------------------------------------------------- Language::initialize(); //-------------------------------------------------------------------------- // Load The Application Start Script //-------------------------------------------------------------------------- $path = $app['path'] . DS . 'Boot' . DS . 'Global.php'; if (is_readable($path)) { require $path; }
public static function middleware(App $app) { $app->middleware('config', function (Response $response) { $response['config'] = Config::get_all(); }); }