Laravel Vapor is a serverless deployment platform for Laravel applications. It allows developers to deploy their Laravel applications to the cloud without having to worry about server management, scaling, or infrastructure.
Laravel Octane is a high-performance application server that's built specifically for Laravel. It can be used with Laravel Vapor, which is a serverless deployment platform for Laravel applications. Here are the steps to use Octane with Laravel Vapor:
- Create a new Laravel Vapor project with laravel/vapor or update an existing one by adding the Octane dependency laravel/octane to your composer.json file. Here's an example:
"require": {
"php": "^7.4|^8.0",
"laravel/vapor": "^3.0",
"laravel/octane": "^1.0"
},
- Install the dependencies by running the composer update command.
- Create an octane.php configuration file in the root directory of your Laravel application. This file will contain the Octane configuration options. Here's an example: