1. Go to this page and download the library: Download miladsarli/cartsystem library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
miladsarli / cartsystem example snippets
POST /api/v1/cart
{
"product_id": 1,
"variant_id": null, // اختیاری
"quantity": 1,
"tenant_id": null // اختیاری - برای سیستمهای چند فروشگاهی
}
GET /api/v1/cart
PUT /api/v1/cart/{cart_id}
{
"quantity": 2
}
DELETE /api/v1/cart/{cart_id}
DELETE /api/v1/cart
POST /api/v1/cart/checkout
{
"address_id": 1
}
bash
php artisan cart:install
bash
# برای نصب فایل کانفیگ
php artisan vendor:publish --tag=cart-config
# برای نصب مایگریشنها
php artisan vendor:publish --tag=cart-migrations
# برای نصب مدلها
php artisan vendor:publish --tag=cart-models
# برای نصب کنترلرها
php artisan vendor:publish --tag=cart-controllers
# برای نصب مسیرها
php artisan vendor:publish --tag=cart-routes
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.