It's a template for using Temporal with Laravel
Temporal Integration with Laravel is a guide on how to integrate Temporal, a workflow automation platform, with Laravel, a PHP framework. The article provides step-by-step instructions on installing and setting up the necessary dependencies to use Temporal in a Laravel project.
.rr.yaml needs to be updated to localhost:7233..env file needs to be updated with the database name, username, and password.To install Temporal Integration with Laravel, follow these steps:
Step 1: Make sure you have PHP 7.4 and Laravel 8, or higher, installed.
Step 2: Install the Temporal PHP SDK using the following composer command in the root of your project:
composer require temporal/sdk
Step 3: Install the gRPC PHP extension by following the instructions at this link. Ensure that you perform all the steps to activate the gRPC extension in your php.ini file and install the protobuf runtime library in your project.
Step 4: Download the RoadRunner 2.0 application server, either manually by downloading its binary from the release page or through other means.
Step 5: Download and start the Temporal Server locally. Execute the following commands to start a pre-built image along with all the dependencies. Refer to the Temporal docker-compose repository for more advanced options.
Step 6: Update the temporal address in .rr.yaml to localhost:7233.
Step 7: Start the application using RoadRunner by running the appropriate command in the rr.yaml file.
To complete the local setup of the Laravel application:
Step 1: Install the required Composer dependencies.
Step 2: Install the required Node dependencies to build the JavaScript files and CSS for the app.
Step 3: Set up the database by opening the .env file and updating the DB_DATABASE to the name of your database, as well as setting a username and password if needed.
Step 4: Set up the mail driver according to the application’s needs. For local testing and debugging, the mail driver can be set to log.
Step 5: Run migration to prepare the database.
Step 6: Start the application.
Temporal Integration with Laravel is a comprehensive guide that walks through the installation and setup process of integrating Temporal with Laravel. It covers the key features required for the integration and provides step-by-step instructions for installing the necessary dependencies and configuring the application. Following the provided guide will allow developers to utilize Temporal’s workflow automation capabilities within their Laravel projects.