https://github.com/php-runtime/laravel
[READ ONLY]
https://github.com/php-runtime/laravel
laravel runtime
Last synced: 3 months ago
JSON representation
[READ ONLY]
- Host: GitHub
- URL: https://github.com/php-runtime/laravel
- Owner: php-runtime
- License: mit
- Created: 2021-03-20T13:00:56.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-12-18T07:38:10.000Z (4 months ago)
- Last Synced: 2026-01-14T14:54:18.702Z (3 months ago)
- Topics: laravel, runtime
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 17
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Runtime
A runtime for [Laravel](https://laravel.com/).
If you are new to the Symfony Runtime component, read more in the [main readme](https://github.com/php-runtime/runtime).
## 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
```php
// 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
```php
// 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);
};
```