javcorreia / laravel-wishlist

wishlist for laravel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel Wishlist

A simple Wishlist implementation for Laravel 11.*

For Laravel versions 5.8|6|7|8|9|10 install previous stable version 3.1
If you have problems with the minimum PHP version of 8.0: install previous stable version 2.2

Latest Stable Version License Total Downloads

  • 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

This was forked from the excellent Bhavinjr's laravel-wishlist with added functionality.

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 create the table 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

About

wishlist for laravel

License:MIT License


Languages

Language:PHP 100.0%