Laravel Development Setup
Before we can get started with Laravel application development we must set up the required development tools.
Laravel Herd
For Mac and Windows development we can use Laravel Herd.
Herd comes in a basic free version that installs PHP, Composer, Node, NPM and the Laravel installer.
Herd also has a pro paid version that offers additional supporting services like database servers and an email server to capture and display emails in a dashboard.
You can download Herd here.
Herd pro can run multiple instances of MySQL, PostGres, MariaDB, Redis, Valkey, Minio and RustFS.
If you are using the free version of Herd, you will need to use the DBngin application for Mac and Windows to be able to run the same database servers as Herd pro.
You will also need to run the Mailpit docker container for email capture and display.
DBngin
On Mac and Windows the free DBngin application allows you to run database servers just like the pro version of Herd.
It can run multiple instances of MySQL, PostGres, MariaDB, Redis and Minio among others.
You can download DBngin here.
Mailpit
Mailpit is a email server that you can run locally in a docker container to capture emails and display them in a web UI dashboard.
You can install and run it with the following docker command:
docker run -d \
--restart unless-stopped \
--name=mailpit \
-p 8025:8025 \
-p 1025:1025 \
axllent/mailpit
Once installed it will capture emails directed to localhost:1025 through the Laravel mail configuration settings.
You can navigate your web browser to localhost:8025 to view the dashboard and captured emails.
Laravel Lerd on Linux and Windows WSL2
The free and open source alternative to the pro version of Herd is called Lerd.
It runs on Linux and offers a TUI and a Web UI dashboard instead of the Laravel Herd native GUI console.
Just like Herd Pro it can run multiple instances of database servers as well as a mail server to capture and display application emails.
You can download Lerd here.
Lerd on a Mac
Lerd uses podman containers to run all of its services.
Lerd can also be installed on a Mac with the caveat that it does not run natively on MacOS.
However by using Lerd you can avoid the need to use DBngin and Mailpit as you do with the free Herd version.
Database server client
One last tool that you will need for Laravel development is a database client to connect to databases to view data and run queries.
You can use the free Jetbrains DataGrip GUI client as one option.
It can connect to database servers like MySql and key value stores like Redis.
Another option is to use the TablePlus GUI client that is a paid application.
Of course you also have the option of installing and using database specific command line clients.
Laravel Herd Pro for instance installs a MySQL cli client when it installs the MySQL database server.
You can use this client from the command line to connect to any MySQL server.
You can download the DataGrip installer here.
You can download the TablePlus installer here.
Conclusion
There exists a robust ecosystem of free and paid tooling that we can use to develop Laravel applications.
Together they cover the most common use cases for Laravel application development.