Skip to content

Repository files navigation

Laravel Runtime

A runtime for Laravel.

If you are new to the Symfony Runtime component, read more in the main readme.

Installation

composer require runtime/laravel

Usage

The runtime will register automatically. You may "force" the runtime by defining the environment variable APP_RUNTIME for your application.

APP_RUNTIME=Runtime\Laravel\Runtime

Front controller

// public/index.phpuseIlluminate\Contracts\Http\Kernel;
define('LARAVEL_START', microtime(true));
require_oncedirname(__DIR__).'/vendor/autoload_runtime.php';
returnfunction (): Kernel {
static$app;
if (null === $app) {
$app = requiredirname(__DIR__).'/bootstrap/app.php';
}
return$app->make(Kernel::class);
};

Artisan

// artisanuseIlluminate\Contracts\Console\Kernel;
define('LARAVEL_START', microtime(true));
require_once__DIR__.'/vendor/autoload_runtime.php';
returnfunction (): Kernel {
static$app;
if (null === $app) {
$app = require__DIR__.'/bootstrap/app.php';
}
return$app->make(Kernel::class);
};

About

[READ ONLY]

Topics

Resources

Stars

18 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages