mcxv/laravel-simple-cart
最新稳定版本:1.0.1
Composer 安装命令:
composer require mcxv/laravel-simple-cart
包简介
A simple shopping cart package for Laravel
README 文档
README
Design
Entity-Relationship Diagram (ERD) and Class Diagram for the E-commerce Package.
@startuml title E-commerce Package Class Diagram '------------------------ ' Base Entities '------------------------ class Customer { +id: int -user_id: bigint +name: string +email: string +phone: string +address: string +created_at: datetime +updated_at: datetime } class Product { +id: int +name: string +description: text +price: decimal +stock_quantity: int +is_active: bool +image_url: string +category: string +created_at: datetime } class Order { +id: int +order_number: string +customer_id: int +status: string +total_amount: decimal +created_at: datetime +updated_at: datetime } class OrderItem { +id: int +order_id: int +product_id: int +quantity: int +price: decimal } class Invoice { +id: int +order_id: int +invoice_number: string +issue_date: datetime +due_date: datetime +notes: text +total_amount: decimal +status: string } '------------------------ ' Payment and Subclass '------------------------ abstract class Payment { +id: int +invoice_id: int +payment_method: string +transaction_id: string +amount: decimal +status: string } class CryptoPayment { +id: int +payment_id: int +crypto_symbol: string +crypto_network: string +crypto_address: string +crypto_amount: decimal +transaction_hash: string +status: string +created_at: datetime } Payment <|-- CryptoPayment '------------------------ ' Shipment '------------------------ class Shipment { +id: int +order_id: int +tracking_number: string +carrier: string +shipped_date: datetime +delivered_date: datetime +shipping_address: string +status: string +notes: text } '------------------------ ' Relationships '------------------------ Customer "1" -- "many" Order Order "1" -- "many" OrderItem Order "1" -- "1" Invoice Invoice "1" -- "many" Payment Order "1" -- "1" Shipment OrderItem "1" -- "1" Product CryptoPayment "1" -- "1" Payment @enduml
FAQ
How to install the package?
- Ensure that the package's
composer.jsonis properly configured with the required dependencies.
"extra": {
"laravel": {
"providers": [
"MCXV\\SimpleCart\\SimpleCartServiceProvider"
],
"aliases": {
"Cart": "MCXV\\SimpleCart\\Facades\\Cart"
}
}
},
- The main application
composer.jsonshould include the package as a dependency:
"require": { "mcxv/laravel-simple-cart": "^1.0" } "repositories": [ { "type": "path", "url": "path/to/laravel-simple-cart", "options": { "symlink": true } } ]
- Run the update command to install the package:
composer update
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2025-09-26