gothinkster / laravel-realworld-example-app

Exemplary real world backend API built with Laravel
https://realworld.io
MIT License
1.2k stars 1.05k forks source link

Remove eloquent-sluggable package and create Slug class + HasSlug trait #4

Closed MPur closed 7 years ago

MPur commented 7 years ago

references to #2 PR I created Slug class and HasSlug trait to remove eloquent-sluggable package.. You're right @SandeeshS this repo doesn't use too many dependencies but I think It can be useful to learn how implement this feature in a laravel way without any package.

What we have here :

sandeesh commented 7 years ago

@MPur thank you. I'm kinda busy today, i'll have a test with this once i'm free and merge them

MPur commented 7 years ago

@SandeeshS i fix this tomorow if you wish but I think "HasSlug" for name is more Laravel way. I mean for example Concerns\HasAttributes and Concerns\HasTimestamps trait are in a Laravel core for Model class.

I used to name my trait in this way :

I rebased the PR. Just need to change structure now. 👍

sandeesh commented 7 years ago

@MPur that makes sense. Keep it to HasSlug :+1:

MPur commented 7 years ago

@SandeeshS I create folder called Sluggable.

MPur commented 7 years ago

@SandeeshS obviously. My bad sorry. It is good now.