Closed chazzka closed 5 months ago
Hey Chazzka, thanks for your input, and yes for sure! this is something fairly easy to implement, I will take a look at it in the upcoming weeks.
Thanks for pointing it out and for your explanation 🙌
Hello @mkwsra, i was facing this error. With the documentation I thought that just by adding the traits CanXXX
like CanLike
it will work with any model.
interactions_user_id_fk_column_name
but is not used in the migration for the interactions table. Also the migration use config('auth.providers.users.model')
insted of config acquaintances.models.user
For now i directly specify the column name in migration alredy created.
Hi Adrià , thanks for pointing this out, we have to do something about this (someone of us)
@mkwsra later i will make a PR modifying the migration and the function isRelationExists
that uses 'user_id' to use the variables in config file.
The option to use two morphTo relation will be cool but will require more time and will introduce breaking changes.
The based-upon package laravel-follow deals with different config attribute for foreign key (changing the default
"user_id"
).This is useful when using different Model for auth (instead of the default
User
)This package unfortunately omits it, making different foreign key impossible to set, eventually causing errors in autogenerated queries. (interactions.
foreign_key_name
).Now, if user wants a different foreign key naming, he can directly specify in migration, but later generated scripts will still respect the previous configuration.
Please consider adding similar configuration as in previous package on this line