Laravel Frontend Presets

Taylor Otwell
Apr 7, 2017 · 2 min read

As many of you probably know, Laravel 5.4 ships with an Example.vue component in the resources/assets/js/components directory. In addition, Laravel Mix supports compiling single-file Vue components out of the box. This gives developers a quick, convenient starting point for building modern, robust JavaScript components for their applications.

For Laravel 5.5, this scaffolding is still in place, but we’re introducing some additional options for frontend scaffolding via a new artisan preset command.


If you love React, you will love Laravel 5.5. Simply run the php artisan preset react command to swap out the Vue scaffolding with React scaffolding. The default Mix configuration, components, and all other related files will be updated accordingly:

Now, instead of an Example.vue component, your application will contain an Example.js React component:


Some users may not want any JavaScript scaffolding at all, but don’t want to lose the basic Bootstrap CSS scaffolding. If that’s you, you can use the artisan preset bootstrap to only remove the Vue scaffolding:

Remove All Scaffolding

Some users may even want to remove all frontend scaffolding. The artisan preset none will remove all frontend scaffolding:

I hope you enjoy these new options! I’d like to shout-out Samantha Geitz and Jesse O’Brien for their advice and work on these features!

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store