Laravel 5.5 Adds Frontend Presets
Laravel 5.5 / April 10, 2017

Laravel 5.5 Adds Frontend Presets

Since Laravel 5.3 the framework has shipped with optional Bootstrap and Vue.js scaffolding so you can quickly get started creating your next app idea with some of the latest tools.

These have always been easy to remove, but not everyone wants to use either of those, so in Laravel 5.5 a new Artisan preset command has been added that allows you to replace out the default with other tools like React, Bootstrap only, and even removing all of it.

React Preset

The React preset command can be initialized through Artisan:

php artisan preset react

After running, this will replace out the Vue.js scaffolding with React. This includes the default Mix configuration, components, and any other related files.

Bootstrap Preset

The Bootstrap preset is useful if you prefer not to use any JavaScript scaffolding at all, but still, want to keep the Bootstrap CSS.

php artisan preset bootstrap

This is designed for those that would rather roll their own JavaScript setup, or PHP only apps that will not require any JavaScript.

Remove all Laravel Vue and Bootstrap Scaffolding

The final preset option is “none” which will remove both Bootstrap and Vue.js:

php artisan preset none

Conclusion

In the announcement of these new presets Taylor didn’t mention what the plans for these are or if more will be added in the future, however, people have already started asking. I’d imagine adding additional will be outside of the scope of this feature and if you’d like to some other JavaScript or CSS framework, it’ll be easier to run the “none” option and start fresh adding whichever one your project needs.

This appeared first on Laravel News
Laravel News Partners

Newsletter

Join the weekly newsletter and never miss out on new tips, tutorials, and more.