javcorreia / laravel-wishlist
a wishlist for laravel
Installs: 863
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 5
pkg:composer/javcorreia/laravel-wishlist
Requires
- php: ^8.1
- illuminate/support: ^11.0|^12.0
Requires (Dev)
- laravel/pint: ^1.22
- orchestra/testbench: ^9.2
- pestphp/pest: ^2.34
- pestphp/pest-plugin-laravel: ^2.3
- phpstan/phpstan: ^2.1
README
A simple Wishlist implementation for Laravel 11.*|12.*
see Versions for older Laravel versions
- saves items associated with users
- saves items associated with sessions on anonymous navigation
- can retrieve items from a user or session
- session items can be retrieved and associated with user on login
Forked from Bhavinjr's laravel-wishlist with some added functionality and updated to latest Laravel and PHP versions.
Table of Contents
Versions
| Version | Supports | Status |
|---|---|---|
| 4.* | Laravel [11, 12]; PHP >= 8.1 | current |
| 3.* | Laravel [5.8, 10]; PHP >= 8.0 | deprecated |
| 2.2 | Laravel [5.8, 9]; PHP ^7.2 | deprecated |
| 2.0 | Laravel [5.8, 8]; PHP ^7.2 | deprecated |
Installation
Is installed via Composer by running in your project's root.
composer require javcorreia/laravel-wishlist
Publish the default configuration file:
php artisan vendor:publish --provider="javcorreia\Wishlist\Providers\WishlistServiceProvider"
Before running migration, edit the required settings using the resulting config/wishlist.php file (See Configuration).
To run migrations:
php artisan migrate
Configuration
Configuration was designed to be as flexible as changing the global configuration in the config/wishlist.php file.
You will need to provide at least, the model for the items to be wishlisted, for example:
return [ 'item_model' => App\Models\Product::class, ];
The other values can be the default ones, unless changes are needed.
After updating the config/wishlist.php file execute the following command to cache configs:
php artisan config:cache
Documentation
See DOCS.md
Testing
See TESTS.md