wip: rename package to joelwmale

This commit is contained in:
Joel Male
2024-11-28 13:06:24 +10:00
parent b3ef4c38fc
commit 599051631c
26 changed files with 442 additions and 518 deletions
+13 -13
View File
@@ -1,11 +1,11 @@
[![Latest Version on Packagist](https://img.shields.io/packagist/v/wearepixel/laravel-cart.svg?style=flat-square)](https://packagist.org/packages/wearepixel/laravel-cart)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/wearepixel/laravel-cart/tests.yml?branch=master&label=Tests)](https://github.com/wearepixel/laravel-cart/actions?query=workflow%3ATests+branch%3Amaster)
[![Total Downloads](https://img.shields.io/packagist/dt/wearepixel/laravel-cart.svg?style=flat-square)](https://packagist.org/packages/wearepixel/laravel-cart)
[![License](https://poser.pugx.org/wearepixel/laravel-cart/license.svg)](https://packagist.org/packages/wearepixel/laravel-cart)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/joelwmale/laravel-cart.svg?style=flat-square)](https://packagist.org/packages/joelwmale/laravel-cart)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/joelwmale/laravel-cart/tests.yml?branch=master&label=Tests)](https://github.com/joelwmale/laravel-cart/actions?query=workflow%3ATests+branch%3Amaster)
[![Total Downloads](https://img.shields.io/packagist/dt/joelwmale/laravel-cart.svg?style=flat-square)](https://packagist.org/packages/joelwmale/laravel-cart)
[![License](https://poser.pugx.org/joelwmale/laravel-cart/license.svg)](https://packagist.org/packages/joelwmale/laravel-cart)
A Cart Implementation for Laravel.
Supported Laravel Versions: 9, 10, 11
Supported Laravel Versions: 9, 10, and 11
## Quick Demo
@@ -33,14 +33,14 @@ ## Installing
Install the package through [Composer](http://getcomposer.org/).
`composer require "wearepixel/laravel-cart"`
`composer require "joelwmale/laravel-cart"`
## Configuration
You can publish the configuration file to customize various options.
```php
php artisan vendor:publish --provider="Wearepixel\Cart\CartServiceProvider" --tag="config"
php artisan vendor:publish --provider="Joelwmale\Cart\CartServiceProvider" --tag="config"
```
### Formatting Numbers
@@ -304,7 +304,7 @@ #### Adding a condition to the cart: **Cart::condition()**
```php
// Add a single condition to the cart
$condition = new \Wearepixel\Cart\CartCondition([
$condition = new \Joelwmale\Cart\CartCondition([
'name' => 'Tax: 10%',
'type' => 'tax',
'target' => 'subtotal', // this condition will be applied to cart's subtotal when getSubTotal() is called.
@@ -317,7 +317,7 @@ #### Adding a condition to the cart: **Cart::condition()**
Cart::condition($condition);
// Add multiple conditions
$tax = new \Wearepixel\Cart\CartCondition([
$tax = new \Joelwmale\Cart\CartCondition([
'name' => 'Tax: 10%',
'type' => 'tax',
'target' => 'subtotal', // this condition will be applied to cart's subtotal when getSubTotal() is called.
@@ -325,7 +325,7 @@ #### Adding a condition to the cart: **Cart::condition()**
'order' => 2
]);
$shipping = new \Wearepixel\Cart\CartCondition([
$shipping = new \Joelwmale\Cart\CartCondition([
'name' => 'Shipping: $15',
'type' => 'shipping',
'target' => 'subtotal', // this condition will be applied to cart's subtotal when getSubTotal() is called.
@@ -340,7 +340,7 @@ #### Adding a condition to the cart: **Cart::condition()**
Cart::condition([$tax, $shipping]);
// add condition to only apply on totals, not in subtotal
$shipping = new \Wearepixel\Cart\CartCondition([
$shipping = new \Joelwmale\Cart\CartCondition([
'name' => 'Express Shipping $15',
'type' => 'shipping',
'target' => 'total',
@@ -532,7 +532,7 @@ ### Condition on items
```php
// lets create first our condition instance
$saleCondition = new \Wearepixel\Cart\CartCondition([
$saleCondition = new \Joelwmale\Cart\CartCondition([
'name' => '50% Off',
'type' => 'tax',
'value' => '-50%',
@@ -552,7 +552,7 @@ ### Condition on items
Cart::add($product);
// You can of course also do multiple conditions on an item
$saleCondition = new \Wearepixel\Cart\CartCondition([
$saleCondition = new \Joelwmale\Cart\CartCondition([
'name' => 'SALE 5%',
'type' => 'sale',
'value' => '-5%',