laravel-survey
laravel-survey copied to clipboard
Translatable
- require translatable package and updated requirements for php and db
- make attributes translatable for survey models
- add indexes to db tables
Hi @scottgrayson and @andreia, thank you for using laravel-survey and for taking the time to create this PR.
I think both spatie/eloquent-sortable and spatie/laravel-translatable are great choices you made in your work, but I'm cautious about adding them as new dependencies to this package, mostly because:
- This will lock us to those packages.
- E.g. we will need to start tracking spatie/laravel-translatable and ensure to tag new versions of laravel-survey as and when new major versions of spatie/laravel-translatable are released.
- E.g. if Spatie chooses to stop supporting a specific version of PHP/Laravel in their future releases, we will have to do the same. This may not always be in the best interest of our audience.
- We can create Dependency Hell for our users.
- E.g. a user may already depend on spatie/laravel-translatable v5.x in their app. They will end up in a difficult situation if laravel-survey requires spatie/laravel-translatable v6.x.
These make me think that it'd be better to leave it to users to install spatie/laravel-translatable directly in their app and extend laravel-survey models and override them as and when they need to.
Leaving the PR open for discussion.