kirkbushell / eloquence

A drop-in library for certain database functionality in Laravel, that allows for extra features that may never make it into the main project.
MIT License
537 stars 60 forks source link

Removes creation of slug after saving the model #73

Closed nicocucuzza closed 4 years ago

nicocucuzza commented 4 years ago

In order to avoid issues related to models stored without Slug, this PR only allows the creation of slugs before saving the model. The id strategy changes behavior. Now, in case the model does not have an ID yet, uses a random int instead to generate the slug.