Download the PHP package hamedov/laravel-favorites without Composer
On this page you can find all versions of the php package hamedov/laravel-favorites. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package laravel-favorites
Laravel favorites
Manage user favorites in laravel application.
Installation
Publish config file
Set user model in config file
- Make sure you do this before migrations
Execute migrations
Setup user model
- Add
Hamedov\Favorites\HasFavorites
trait to your user model
Usage
-
Add item to user favorites
-
Remove item from user favorites
-
Get user favorites of specific type
-
Get user favorite ids of specific type
-
Get use favorite ids with corresponding types, i.e, pivot table entries
- Remove all user favorites
Available scopes
-
hasFavorite
Scope users who added specific model to favorites hasFavoriteOfType
Scope users who add any model of specific type to favorites
License
Released under the Mit license, see LICENSE
All versions of laravel-favorites with dependencies
PHP Build Version
Package Version
The package hamedov/laravel-favorites contains the following files
Loading the files please wait ....