I've created a base class for my migrations. At the moment I run the artisan migrate command and it creates a new migration that extends the Migrations file, however I want to include my BaseMigration and extend it from there. I've been making this changes manualy but I feel like I'm repeating myself unnecessarily.
Any advice on how to have new migrations automatically extend and load my base migration?
Since Laravel 7 you can publish stubs using php artisan stub:publish
.
The published stubs will be located within a
stubs
directory in the root of your application. Any changes you make to these stubs will be reflected when you generate their corresponding classes using Artisanmake
commands.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With