sarga/packages/Webkul/Cart/src/Http/Controllers/CartController.php

45 lines
929 B
PHP
Raw Normal View History

2018-09-06 06:20:30 +00:00
<?php
namespace Webkul\Cart\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Webkul\Cart\Repositories\CartRepository;
use Webkul\Cart\Repositories\CartItemsRepository;
use Session;
/**
* Cart controller for the customer
* and guest users for adding and
* removing the products in the
* cart.
*
* @author Prashant Singh <prashant.singh852@webkul.com>
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class CartController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
protected $_config;
protected $cart;
public function __construct(CartRepository $cart)
{
$this->middleware(['customer', 'guest']);
$this->_config = request('_config');
$this->cart = $cart;
}
public function add() {
return "Adding Items to Cart";
}
}