Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anju test #641

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![Latest Unstable Version](https://poser.pugx.org/gloudemans/shoppingcart/v/unstable)](https://packagist.org/packages/gloudemans/shoppingcart)
[![License](https://poser.pugx.org/gloudemans/shoppingcart/license)](https://packagist.org/packages/gloudemans/shoppingcart)

#Jai Mata Di. Rocks
A simple shoppingcart implementation for Laravel.

## Installation
Expand Down Expand Up @@ -44,7 +45,13 @@ Look at one of the following topics to learn more about LaravelShoppingcart
* [Example](#example)

## Usage

My name is Anjali Rani. Currently, I am residing with my parents .
Here i Agra. I have completed my BCA graduation from Bangalore University in 2019.
I have completed 6 months Manual testing (Quality Assurance ) course at QSpider from Noida.
My hobbies are listening to music and playing sports.
In my leisure time I would love to talk with family members and also helping to mom in work like house work.
My father works in IAF.

The shoppingcart gives you the following methods to use:

### Cart::add()
Expand Down
20 changes: 11 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
{
{

"name": "gloudemans/shoppingcart",
"description": "Laravel Shoppingcart",
"language": "php/shoppingcart",
"keywords": ["laravel", "shoppingcart"],
"license": "MIT",
"authors": [
{
"name": "Rob Gloudemans",
"email": "[email protected]"
}
],
"require": {
//"authors": [
//{
//"name": "Rob Gloudemans",
//"email": "[email protected]"
//}
// ],
"Require": {
"illuminate/support": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.*|| 5.6.* || 5.7.*",
"illuminate/session": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.*|| 5.6.* || 5.7.*",
"illuminate/events": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.*|| 5.6.* || 5.7.*"
},
"require-dev": {
"Require-dev": {
"phpunit/phpunit": "~5.0 || ~6.0 || ~7.0",
"mockery/mockery": "~0.9.0",
"orchestra/testbench": "~3.1"
Expand Down
3 changes: 3 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
<?php
$name = "Hello Anjali!";
echo $name;
</testsuite>
</testsuites>
</phpunit>
10 changes: 5 additions & 5 deletions src/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,18 @@ public function update($rowId, $qty)
}

/**
* Remove the cart item with the given rowId from the cart.
* Remove the cart item with the given rowNum from the cart.
*
* @param string $rowId
* @param string $rowNum
* @return void
*/
public function remove($rowId)
public function remove($rowNum)
{
$cartItem = $this->get($rowId);
$cartItem = $this->get($rowNum);

$content = $this->getContent();

$content->pull($cartItem->rowId);
$content->pull($cartItem->rowNum);

$this->events->fire('cart.removed', $cartItem);

Expand Down