Did you know that Laravel, the popular PHP framework, and Herd, a new macOS-native development environment, make a powerful combination for web developers. In this tutorial, we'll walk you through setting up a Laravel project using Herd, streamlining your development workflow.
What is Herd?
Herd is a native macOS application that manages your entire PHP stack, including:
- Nginx
- MySQL
- Multiple PHP versions
Unlike traditional setups, Herd doesn't rely on Docker or virtual machines, offering improved performance and resource efficiency.
You can download Laravel Herd here. It's the best app for those who are just getting started with Laravel.
Note: You can use laravel herd in Windows now and soon it will on linux.
Why Use Herd for Laravel Development?
Before Herd, you needed to install a lot of things to start working with a Laravel project: PHP, Composer, Node.js, and more. But with Laravel Herd, you can do all that with a single click. It significantly simplifies the setup process, allowing you to focus on development rather than configuration.
Key benefits of using Herd include:
- Quick Setup: Start new Laravel projects in minutes.
- Native Performance: Run your stack without virtualization overhead.
- Version Flexibility: Easily switch between PHP versions.
- Laravel Ecosystem Integration: Seamless compatibility with other Laravel tools.
Creating a new Laravel project
Go to your top left bar window if you on mac and top bar left if you are using windows.
Then click sites.
You will see new window being open like this.
Now click plus icon on the top of that sidebar.
Then click laravel or you can link your custom project folder.
Now choose your starter kit, I like to use Laravel Jetstream.
You can now configure the options. Each starter kit will have different configurations. Personally, I prefer these settings.
Then click next. And wait.
After it done you can now open the url or open your IDE and more.
In this example, I can open a browser with the following URL: http://blog-project.test/
.
And your project is created.
If you go back to your Herd sites window, you can click the "Action" button, which provides quite useful shortcuts to manage your project.
Top comments (0)