Skip to content

Commit

Permalink
clean up and formating
Browse files Browse the repository at this point in the history
  • Loading branch information
BahaaAlhagar committed Sep 1, 2019
1 parent 8ba932d commit 8a23c64
Show file tree
Hide file tree
Showing 23 changed files with 34 additions and 872 deletions.
27 changes: 0 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,6 @@ And add a new line to the `aliases` array:
'Cart' => BahaaAlhagar\ShoppingCart\Facades\Cart::class,
```


Now you're ready to start using the shoppingcart in your application.

If you want a quick real test or a first step for your app you may install the basic shop that comes with the ShoppingCart.

in your terminal
``` bash
php artisan make:shop
```

that will move the required files and migration files to your application, then we will have to migrate the required tables and seed some dummy data.
first migrate the tables.

``` bash
php artisan migrate
```
then add the test products.

``` bash
php artisan db:seed --class=ShopSeeder
```

you may now visite the basic shop at
``` bash
http://yourAppUrl/shop
```

## Usage

The ShoppingCart gives you the following methods to use:
Expand Down
4 changes: 2 additions & 2 deletions src/Exceptions/CartIsEmptyException.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace BahaaAlhagar\ShoppingCart\Exceptions;

use RuntimeException;

/**
* run time exception
*/
class CartIsEmptyException extends RuntimeException
{

}
}
4 changes: 2 additions & 2 deletions src/Exceptions/InvalidQuantityException.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace BahaaAlhagar\ShoppingCart\Exceptions;

use RuntimeException;

/**
* run time exception
*/
class InvalidQuantityException extends RuntimeException
{

}
}
4 changes: 2 additions & 2 deletions src/Exceptions/UnknownUniqueIndexException.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace BahaaAlhagar\ShoppingCart\Exceptions;

use RuntimeException;

/**
* run time exception
*/
class UnknownUniqueIndexException extends RuntimeException
{

}
}
7 changes: 4 additions & 3 deletions src/Facades/Cart.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
<?php

namespace BahaaAlhagar\ShoppingCart\Facades;

use Illuminate\Support\Facades\Facade;

class Cart extends Facade {
class Cart extends Facade
{
/**
* Get the binding in the IoC container
*
Expand All @@ -14,4 +15,4 @@ protected static function getFacadeAccessor()
{
return 'ShoppingCart'; // the IoC binding.
}
}
}
59 changes: 0 additions & 59 deletions src/Shop/Controllers/OrderController.php

This file was deleted.

63 changes: 0 additions & 63 deletions src/Shop/Controllers/ProductController.php

This file was deleted.

35 changes: 0 additions & 35 deletions src/Shop/Migrations/2017_12_25_160233_create_products_table.php

This file was deleted.

51 changes: 0 additions & 51 deletions src/Shop/Migrations/2018_01_01_211705_create_orders_table.php

This file was deleted.

25 changes: 0 additions & 25 deletions src/Shop/Models/Order.php

This file was deleted.

15 changes: 0 additions & 15 deletions src/Shop/Models/Product.php

This file was deleted.

36 changes: 0 additions & 36 deletions src/Shop/Requests/validateCheckOutRequest.php

This file was deleted.

Loading

0 comments on commit 8a23c64

Please sign in to comment.