Category: Laravel, PHP, api

The day is finally here, Laravel 8, the next major release of the Laravel framework, was released today. There wasn’t anything particularly wrong with how model factories where written but it is still a welcome change.

Previously you would have defined and applied a states like so: In Laravel 8 this now turns into: Since you now have a trait for your models, HasFactory,it is even easier to create new models using a factory.

Accessing a Laravel application that is in maintenance mode previously require you to specify an IP allow-list, that is obviously not very scalable, especially when you want to share the application with a client or a distributed team.

This is now a thing of the past since you can tell Laravel to pre-render the page that is shown when your application is in maintenance mode which completely bypasses the whole bootstrapping process of the app and jumps straight into the cached view.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners