In our specific package case, we didn't need some features, but I do want to mention them and show you how to use them, in case your packages need them.
Eloquent Models
This one is pretty easy, you just create a Model class in the /src/Models of the package and namespace it correctly.
Then, your Controllers (or the Controllers outside the package) may just use the Model by loading it from the correct namespace....
It's very useful thank you very much
For migrations, I would not overwrite the migration creation date What if someone runs the publish of your package, it creates a new migration file for them, and after running `php artisan migrate' it displays an error that such a table already exists
We are not talking about constant update on the timestamp. It is more of a:
Changing it after a commit - is a bad thing indeed!
I use
php artisan vendor:publish --allincomposer.jsonto update my packages aftercomposer update, I often forgot aboutvendor:publishA similar problem with creating a new migration again and again was e.g. in
spatie/laravel-medialibraryI created a PR that search a file by name without a date and they approved it https://github.com/spatie/laravel-medialibrary/pull/3299/commits/96fd55782f8d0ada7360e139bf2e385f4750f925