Download the PHP package tomshaw/shopcart without Composer
On this page you can find all versions of the php package tomshaw/shopcart. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tomshaw/shopcart
More information about tomshaw/shopcart
Files in tomshaw/shopcart
Package shopcart
Short Description A modern easy to use Laravel shopping cart
License MIT
Informations about the package shopcart
ShopCart 🛒
ShopCart is a modern easy to use Laravel shopping cart.
Installation
You can install the package via composer:
Publish configuration file
Requirements
The package is compatible with Laravel 10 and 11.
Basic Usage
Adding an item to the shopping cart.
Note: Cart item constructor properties are validated when creating or updating cart items.
Note: A unique random integer
rowId
is created and used to identify cart items.
Adding an item with product options to the shopping cart.
Updating an item and product options in the shoping cart.
Removing an item from the shopping cart.
Deleting the shopping cart after checkout.
Cart Totals
Sums the properties:
tax
,price
,subtotal
andquantity
.
Tax Rates
To set a default tax rate add the following environment variable in your application .env
.
You can easily apply item specific tax rates at run time.
Number Formatting
Number formating is handled by adding the following environment variables to your application .env
.
Proxy Methods
Get item from collection by rowId
.
Check if cart item exists by rowId
.
Get cart as collection or array.
Searching for specific cart items.
Check if the cart is empty or not.
Casting the cart as an array
or json
;
Changelog
For changes made to the project, see the Changelog.
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). See License File for more information.
All versions of shopcart with dependencies
illuminate/events Version ^10.14|^11.0
illuminate/session Version ^10.14|^11.0
illuminate/support Version ^10.14|^11.0