From ea919aac8b133bb913b2534c5091991d5dd19edc Mon Sep 17 00:00:00 2001 From: Milwad Khosravi Date: Sun, 30 Jun 2024 10:15:47 +0330 Subject: [PATCH 1/3] Update README.md --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 97c74d4..c0fdd84 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,23 @@ [![License](http://poser.pugx.org/binafy/laravel-cart/license)](https://packagist.org/packages/binafy/laravel-cart) [![Passed Tests](https://github.com/binafy/laravel-cart/actions/workflows/tests.yml/badge.svg)](https://github.com/binafy/laravel-cart/actions/workflows/tests.yml) +- [Introduction](#introduction) +- [Installation](#installation) +- [Publish](#publish) +- [Usage](#usage) + - [Configuration](#configuration) + - [Store Cart](#store-cart) + - [Store Items For a Cart](#store-items-for-a-cart) + - [Access Itemable](#access-itemable) + - [Create Cart With Storing Items](#create-cart-with-storing-items) + - [Store multiple items](#store-multiple-items) + - [Delete Item From Cart](#delete-item-from-cart) + - [Delete All Items From Cart](#delete-all-items-from-cart) +- [Contributors](#contributors) +- [Security](#security) +- [Changelog](#changelog) +- [License](#license) + ## Introduction @@ -138,6 +155,7 @@ $cart = Cart::query()->firstOrCreate(['user_id' => $user->id]); $cart->storeItems($items); ``` + ### Delete Item From Cart If you may to delete an item for a cart, you can use `removeItem` method: @@ -162,6 +180,7 @@ $cart = Cart::query()->firstOrCreate(['user_id' => $user->id]); $cart->removeItem($product1); ``` + ### Delete All Items From Cart If you may to delete all items from a cart, you can use `emptyCart` method: From ece278068b1393c97688b6d241465fdbbef8f37c Mon Sep 17 00:00:00 2001 From: Milwad Khosravi Date: Sun, 30 Jun 2024 10:17:19 +0330 Subject: [PATCH 2/3] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index c0fdd84..6342065 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,11 @@ After publishing, run the `php artisan migrate` command. ## Usage + +### Configuration + +You can config the `Laravel Cart` with `laravel-cart.php` config that exists in `config` folder. + ### Store Cart From 14e632f5717214b02cda7871d9843cebcfa7c549 Mon Sep 17 00:00:00 2001 From: Milwad Khosravi Date: Mon, 1 Jul 2024 09:33:56 +0330 Subject: [PATCH 3/3] update features in readme --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6342065..8a8f150 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ [![Passed Tests](https://github.com/binafy/laravel-cart/actions/workflows/tests.yml/badge.svg)](https://github.com/binafy/laravel-cart/actions/workflows/tests.yml) - [Introduction](#introduction) +- [Features](#features) - [Installation](#installation) - [Publish](#publish) - [Usage](#usage) @@ -30,13 +31,19 @@ The `Laravel Cart` is a highly customizable and flexible package that integrates basket functionality into your Laravel application. It simplifies storing and managing cart items, supporting multiple item types and quantities. It is ideal for e-commerce platforms to create carts, attach items, and manage them efficiently. Installation is straightforward via Composer, and it offers robust features like secure item storage, easy cart manipulation, and seamless integration with your existing Laravel app. -## Features: + +## Features -- Secure card information storage and management -- Support for multiple payment gateways -- Recurring payment and subscription management -- Robust validation and error handling -- Highly customizable and flexible architecture +The `Laravel Cart` package is an ideal choice for developers looking to implement a reliable and scalable cart system in their Laravel-based e-commerce applications: + +- Item Management: Easily add, update, and remove items from the cart with an intuitive API. +- Attributes and Options: Define custom attributes and options for cart items to handle variations like size and color. +- Tax Calculation: Built-in support for tax calculations, enabling automatic tax application based on predefined rules. +- Discounts and Coupons: Integrate discount codes and coupon functionalities to offer promotions and special offers to customers. +- Session and Database Storage: Flexible storage options allowing carts to be stored in sessions or the database. +- Events and Listeners: Hook into various cart events with listeners to perform actions like logging or triggering additional business logic. +- Customizable: Extend and customize the core functionalities to meet specific business requirements. +- Easy Integration: Designed to integrate seamlessly with existing Laravel projects, providing a smooth development experience. ## Installation