Laravel Frontend Presets – Taylor Otwell – Medium

  • 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.ReactIf 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:BootstrapSome 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 ScaffoldingSome 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!

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…

@timarney: Looks like React is getting some 😍 from @laravelphp That’s pretty big news. #reactjs

#reactjs

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.

command.

command to swap out the Vue scaffolding with React scaffolding. The default Mix configuration, components, and all other related files will be updated accordingly:

React component:

to only remove the Vue scaffolding:

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!

Laravel Frontend Presets – Taylor Otwell – Medium