laravel
eloquent-sluggable
laravel | eloquent-sluggable | |
---|---|---|
2 | 4 | |
1,520 | 3,929 | |
1.9% | 0.5% | |
4.6 | 6.4 | |
4 months ago | about 2 months ago | |
PHP | PHP | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
laravel
- Using pre-existing database - HELP
-
What do you think about API Artisan?
Instead, go the other way around. There are plenty of packages that convert an SQL database into a collection of models. Some of them are really good, like this one https://github.com/reliese/laravel - I used that on an existing project with 78 tables and it produced a very decent and usable result.
eloquent-sluggable
-
Like and Unlike Button with Alpine: Laravel
Now add function to handle like action this will check if the user has already like it or not. Here I have set the blog to open with slug not the id. For that I have used eloquent-sluggable by cviebrock. BlogController.php:
-
generate unique slug with eloquent-sluggable package laravel 8
for more feature, maybe you want to read the documentations
-
Is a good idea to use slugs with ids?
You could use something like eloquent-sluggable to generate unique slugs for your posts. Thy way you wouldn't need to expose your ids. Depending on the use case the id could be considered a secret. If you expose it in the url, someone could enumerate the parameter, and potentially expose things you don't want exposed
-
Get Actual Model Name After Passing As Slug
I would use a package to handle slugs. This one for example provides some convenient methods so you can simplify to $hobby = Hobby::findBySlug($slug);
What are some alternatives?
laravel-tags - Add tags and taggable behaviour to your Laravel app
laravel-erd - Automatically generate ERD Diagrams from Model's relations in Laravel
laravel-eloquent-query-cache - Adding cache on your Laravel Eloquent queries' results is now a breeze.
laravel-elasticsearch - Use Elasticsearch as a database in Laravel to retrieve Eloquent models and perform aggregations.
ReadOnlyTraitLaravel - Laravel Read Only Model Traits
Laravel - Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation for your next big idea — freeing you to create without sweating the small things.
laravel-db-session-helper - This package is build on top of the Laravel session database driver. With it you are able to query users by their login state.
eloquent-viewable - Associate views with Eloquent models in Laravel
EloquentFilter - An Eloquent Way To Filter Laravel Models And Their Relationships
laravel-migrations-generator - Laravel Migrations Generator: Automatically generate your migrations from an existing database schema.
Elasticsearch Eloquent - ⚡️ Models like Eloquent for Elasticsearch.