Skip to main content

Posts

Showing posts with the label Customizing Stubs in Laravel

Laravelnote: Customizing Stubs in Laravel by Laravelnote

  This post will show you how to customize stubs used to generate various classes in your application. While a minor inconvenience, manually adjusting every generated class can be tedious, and Laravel provides a way for developers to publish and version stubs in an application if you want to suit generated classes to your specific taste. If you want to follow along, you can create a new Laravel project with the  Laravel installer , using Sail, or any other way you prefer to create a new application: laravel new stub-demo --git You might have noticed that the  Laravel installer now supports Git and GitHub integration  assuming you have the minimum git version required, you should have a new repository and a first commit. Versioning our demo project is an excellent way to visualize the stub changes we make along the way and see what kind of files Laravel publishes to the app. Publishing Stubs #laravelnote The first step in customizing stubs could be to add stubs you'd like to customi