2017 © Pedro Peláez
 

library laravel-wishlist

wishlist for laravel 5.*.*

image

bhavinjr/laravel-wishlist

wishlist for laravel 5.*.*

  • Monday, April 30, 2018
  • by bhavinjr
  • Repository
  • 0 Watchers
  • 1 Stars
  • 154 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 95 % Grown

The README.md

laravel-wishlist

A simple Wishlist implementation for Laravel 5..., (*1)

Latest Stable Version Total Downloads License, (*2)

Installation

First, you'll need to install the package via Composer:, (*3)

$ composer require bhavinjr/laravel-wishlist

If you are don't use using Laravel 5.5.* Then, update config/app.php by adding an entry for the service provider., (*4)

'providers' => [
    // ...
    Bhavinjr\Wishlist\Providers\WishlistServiceProvider::class,
];

'aliases' => [
    //...
    "Wishlist": "Bhavinjr\Wishlist\Facades\Wishlist",
];

In command line paste this command:, (*5)

php artisan config:cache

In command line again, publish the default configuration file:, (*6)

php artisan vendor:publish --provider="Bhavinjr\Wishlist\Providers\WishlistServiceProvider"

In command line paste this command:, (*7)

php artisan migrate

Configuration

Configuration was designed to be as flexible. global configuration can be set in the config/wishlist.php file., (*8)

```<?php return [ 'product_model' => 'App\Models\Product', ];, (*9)


after update `config/wishlist.php` file. ```shell php artisan config:cache

Usage

The package gives you the following methods to use:, (*10)

Adding an item to the wishlist is really simple, (*11)

you need specify product_id and user_id respectively all parameter are compulsory, (*12)

Wishlist::add()

Wishlist::add(15, 1);

Wishlist::remove()

To remove an item from the wishlist, specify the wishlist_id., (*13)

Wishlist::remove(2);

Wishlist::getUserWishlist()

To get users all wishlist item, specify the user_id., (*14)

Wishlist::getUserWishlist(1);

Wishlist::removeUserWishlist()

To remove users all wishlist item, specify the user_id., (*15)

Wishlist::removeUserWishlist(1);

Wishlist::removeByProduct()

To remove particular product using product_id, specify the product_id and user_id respectively., (*16)

Wishlist::removeByProduct(15, 1);

Wishlist::count()

To count users all wishlist item, specify the user_id., (*17)

Wishlist::count(1);

Wishlist::getWishlistItem()

To get particular wishlist item, specify the product_id and user_id respectively, (*18)

Wishlist::getWishlistItem(15, 1);

You can also load product detail, (*19)

$result  =  Wishlist::getUserWishlist(1)->load('product');

or you can also access directly

The Versions

30/04 2018

dev-master

9999999-dev

wishlist for laravel 5.*.*

  Sources   Download

MIT

The Requires

 

by Bhavin Rudani

wishlist laravel ecommerce laravel wishlist wishlist laravel ecommerce laravel wishlist

30/04 2018

1.2

1.2.0.0

wishlist for laravel 5.*.*

  Sources   Download

MIT

The Requires

 

by Bhavin Rudani

wishlist laravel ecommerce laravel wishlist wishlist laravel ecommerce laravel wishlist

19/02 2018

1.1

1.1.0.0

wishlist for laravel 5.*.*

  Sources   Download

MIT

The Requires

 

by Bhavin Rudani

wishlist laravel ecommerce laravel wishlist wishlist laravel ecommerce laravel wishlist

12/12 2017

1.0

1.0.0.0

wishlist for laravel 5.*.*

  Sources   Download

MIT

The Requires

 

by Bhavin Rudani

wishlist laravel ecommerce laravel wishlist wishlist laravel ecommerce laravel wishlist