Laravel Octane
- Introduction
- Installation
- Server Prerequisites
- Serving Your Application
- Dependency Injection & Octane
- Managing Memory Leaks
- Concurrent Tasks
- Ticks & Intervals
- The Octane Cache
- Tables
Introduction
Laravel Octane supercharges your application's performance by serving your application using high-powered application servers, including Open Swoole, Swoole, and RoadRunner. Octane boots your application once, keeps it in memory, and then feeds it requests at supersonic speeds.
Installation
Octane may be installed via the Composer package manager:
1composer require laravel/octane
After installing Octane, you may execute the octane:install
Artisan command, which will install Octane's configuration file into your application:
1php artisan octane:install
Server Prerequisites
Laravel Octane requires PHP 8.0+.
RoadRunner
RoadRunner is powered by the RoadRunner binary, which is built using Go. The first time you start a RoadRunner based Octane server, Octane will offer to download and install the RoadRunner binary for you.
RoadRunner Via Laravel Sail
If you plan to develop your application using Laravel Sail, you should run the following commands to install Octane and RoadRunner:
1./vendor/bin/sail up2 3./vendor/bin/sail composer require laravel/octane spiral/roadrunner
Next, you should start a Sai