The Laravel ecosystem has recently released a couple of new packages that are worth taking a look at. We ❤️ Laravel and know you do too; keeping tabs on what's new is essential. So let's dive in: 

First up is Laravel Folio. 

Laravel Folio is a new automatic file and directory-based routing system. It took a minute to wrap our heads around it, but it made sense once we did. Folio is for simple use cases when you don't need to worry about a full-scale application. To set it up, you need to install it and then put a view in resources/views/pages/. Once you have done that, page-name.blade.php will load at yourapp.com/page-name.

Get started with the composer package and the install artisan command:

composer require laravel/folio

Once you have a few pages in your /pages folder, Folio gives you access to an artisan command for listing your routes:

php artisan folio:list

But what about my _______ use case? 

Nested Routes:

Nested routes with Folio are simple. Just create a subfolder in /pages. For example, /pages/user/profile.blade.php will route to /yourapp.com/user/profile.  

What about Route Parameters?

Folio has this covered. 

First, you can use the Folio Artisan command: 

php artisan make:folio "blog/[id]"

Now we have a /pages/blog subfolder and a view named [id].blade.php. You can then reference your parameter in the view using the variable {{ $id }}. Route parameters are incredibly powerful, and you haven't touched a controller or route file. 

Okay, but what about route model binding?

Continuing with our Blog example, you could use the artisan command: 

php artisan make:folio "posts/[Post]"

Running the above command will build /pages/posts/[Post].blade.php for you. And now, inside the blade template, you can access a Post's properties and relationships. Again, you have not touched controllers and route files.  

Laravel Folio isn't here to replace your routes files in some cases. But, it is an excellent option in multiple use cases. It is worth exploring in your next build.

Next up is Laravel Herd

Laravel Herd is a fantastic new open-source OSX-based PHP development environment from the rad folks over at BeyondCode. 

Laravel Herd has a few key selling points:

  1. It's fast, screaming fast.

  2. It lets you easily manage multiple PHP versions.

  3. It includes the binaries for Composer and LAravel so you can get started more quickly.

Laravel Herd can easily replace your Mamp, Valet, or other dev environments.  

So how do you use it? 

Well, first, you need to download it

Next up, spin up a new project in the /Herd folder on your computer.

From there, you are good to go. It's as simple as that.
What about ______ insert question here:

  • PHP versions - Easily swap between PHP versions

  • SSL - You can secure a site from the GUI that comes with Herd or from the command line with [herd secure example-site]

  • Sharing sites - Herd uses Expose to help you share your local sites.

  • Testing - ~30% performance gains with Herd

Laravel Herd is new, so it remains to be seen how it will do, but we think it is an excellent addition to the LAravel ecosystem and think its  

Both of these tools are fantastic, and while not for everyone, they fill a need and make the Laravel development experience even better.

Have questions about Laravel?

Lets Talk