Laravel on PAM
PAM runs an unmodified Laravel application in a persistent PHP Embed worker.
Runtime integration classes live under Pam\Laravel; the
pushinbr/pam-laravel package adds production presets, diagnostics,
observability, process supervision, and deployment operations.
pam init my-laravel-app --template laravelcd my-laravel-apppam dev pam.phpPAM downloads the official Laravel skeleton, installs its Composer dependencies, runs package discovery, creates the application key, and adds a stateless GET /api/ping route.
Supported framework versions
Section titled “Supported framework versions”The maintained executable contract covers Laravel 12 and current Laravel 13 on PHP 8.4 Embed.
The matrix exercises boot, providers, middleware, routing, validation, exceptions, terminating callbacks, Eloquent, authentication, sessions, CSRF, uploads, streamed responses, binary responses, package discovery, and stable memory behavior.
Persistent lifecycle
Section titled “Persistent lifecycle”PAM boots bootstrap/app.php, the HTTP kernel, providers, configuration, and routes once. For every request, it clones the application container into a sandbox, points framework managers and scoped services at that sandbox, handles the request, terminates it, flushes request state, destroys the sandbox, and restores the root application.
Application code must still avoid keeping the current request, authenticated user, tenant, response, or transaction in global or static state.
Concurrency
Section titled “Concurrency”Laravel managers, facades, the router, and third-party packages contain mutable process-global state. PAM therefore enforces one concurrent Laravel request per worker, including Socket callbacks.
pam start pam.php --workers "$(nproc)"Scale through multiple workers. A native PAM application does not inherit this Laravel-specific concurrency restriction.
Console processes
Section titled “Console processes”pam artisan migratepam artisan route:listpam artisan testpam artisan queue:workQueue workers, Horizon, and the scheduler are separate long-running console processes. Supervise them independently from the HTTP worker pool.
For a production-shaped application:
composer require pushinbr/pam-laravelpam artisan pam:install --preset=apipam artisan pam:check-productionContinue with the production platform.