adr1enbe4udou1n / laravel-boilerplate

Laravel 5.7 Boilerplate based on Bootstrap 4 and Vue Tabler for Backend.
https://laravel-boilerplate.okami101.io
MIT License
259 stars 107 forks source link

User slugs are not unique #113

Open akimcsm opened 5 years ago

akimcsm commented 5 years ago

I know this issue was fixed for the Post model #76, but I recently ran into it while saving multiple users with the same name.

A temporary fix for people facing the same issue might be changing the column that is being used as a slug (e.g. in the boot() method from the User model, change $model->name to $model->email since email is always unique).

shirshak55 commented 5 years ago

yea they are not unique i ended up using eloquent sluggable.

shirshak55 commented 5 years ago

Yea I think you can use dedicated eloquent sluggable . We can also use the package but some package don't support localization some don't have feature etc.

I think we can close the issue right? Thanks