Download the PHP package lamalama/laravel-wishlist without Composer
On this page you can find all versions of the php package lamalama/laravel-wishlist. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lamalama/laravel-wishlist
More information about lamalama/laravel-wishlist
Files in lamalama/laravel-wishlist
Package laravel-wishlist
Short Description Make your models wishlistable
License MIT
Homepage https://github.com/lamalamaNL/laravel-wishlist
Informations about the package laravel-wishlist
Laravel Wishlist
Make your Eloquent models wishlistable.
Install
Via Composer
You can publish the migration with:
After publishing the migration you can create the wishlist
table by running the migrations:
You can optionally publish the config file with:
Prepare user model
Import the trait to your User model file.
Add the trait to your User model.
Prepare wishlistable model(s)
Optionally you can add the trait to Eloquent models that you want to give additional methods. Import the trait to your wishlistable model file.
Add the trait to your wishlistable model.
Use
You can add any Eloquent model as 'wish' to the User model:
Optionally you can set the name of the wishlist to which you want to add the wish. When no list is specified the wish will be stored on the 'default' list. The name of the default list can be adjusted in the config file.
You can remove any Eloquent model as 'wish' from the User model:
Get all wishlists
Get a specific wishlist
Change log
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.