runtime / laravel
Laravel runtime
Fund package maintenance!
nyholm
0.1.1
2021-09-10 20:33 UTC
Requires
- illuminate/contracts: ^8.33
- symfony/runtime: ^5.3 || ^6.0
Requires (Dev)
- illuminate/http: ^8.33
- symfony/console: ^4.4 || ^5.2 || ^6.0
- symfony/phpunit-bridge: ^5.3
README
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.php use Illuminate\Contracts\Http\Kernel; define('LARAVEL_START', microtime(true)); require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; return function (): Kernel { static $app; if (null === $app) { $app = require dirname(__DIR__).'/bootstrap/app.php'; } return $app->make(Kernel::class); };
Artisan
// artisan use Illuminate\Contracts\Console\Kernel; define('LARAVEL_START', microtime(true)); require_once __DIR__.'/vendor/autoload_runtime.php'; return function (): Kernel { static $app; if (null === $app) { $app = require __DIR__.'/bootstrap/app.php'; } return $app->make(Kernel::class); };