Conversation
|
Made a PR to Statamic so we can select specific repositories on the install command for the Eloquent Driver. |
There was a problem hiding this comment.
It feels weird to have this file here with a namespace that doesn't match. Maybe create a stubs directory just like Laravel handles that?
There was a problem hiding this comment.
But the namespace matches and we dont actually publish it to the project, we load it from this repository.
See src/Commands/InstallCommand.php:85
There was a problem hiding this comment.
Ah I see, but it's likely that the end user want to edit the user model.
- Maybe keep it as a stub and publish it? But what if there is already a model?
- Keep it here and extend it within the project?
- If there is already a user model; that file still needs this changes.
So maybe option 2 so we can simply change the "extends ..." in case 3 so it will extend the model from this package instead of the framework? project -> package -> framework
There was a problem hiding this comment.
Yes 2 seems fine to me as well.
But during the install command do we just keep it in the package?
So when a user wants to extend it into their project, they can do it themselves.
|
If you run the command twice, it doesn't mess anything up? |
Added some checks and changed some stuff around to make sure nothing breaks when running the install command multiple times. |
Changed the flow for the install command a bit, also added the configuration for the User model so we don't need #90 anymore.
The flow of the install command now is as follows:
@php artisan statamic:install --ansiinto the post-autoload-dump, as Statamic's install command doesn't do that.Next we setup everything for the user by:
statamic:auth:migrationcommand.Now we setup everything for the Eloquent Driver by:
statamic:install:eloquent-drivercommand to configure the Eloquent DriverAt last we ask the user to:
Furthermore i changed the version of
rapidez/sitemapto^3.0for it to work with Rapidez v3.