magdicom/laravel-test-initial

初始测试!

dev-main 2022-09-15 04:27 UTC

This package is auto-updated.

Last update: 2024-09-15 08:36:06 UTC


README

安装新的 Laravel 项目,然后通过 composer 添加此包

composer require magdicom/laravel-test-initial:"*"

可选配置

要发布配置文件,请运行以下命令

php artisan vendor:publish --tag=test-initial-config

这将把 testinitial.php 文件放在 /config 目录中,您可以在此处指定按类别/SKU和货币的折扣。

API

筛选参数为 categoryprice_fromprice_to,这些参数可以单独使用或组合使用

# All products
https:///api/products
https:///api/products?category=insurance
https:///api/products?price_from=200000
https:///api/products?price_to=90000
https:///api/products?category=insurance&price_from=50000
https:///api/products?price_from=150000&price_to=250000

实时测试

https://test-initial.momagdi.com/api/products

https://test-initial.momagdi.com/api/products?category=insurance

https://test-initial.momagdi.com/api/products?price_from=200000

https://test-initial.momagdi.com/api/products?price_to=90000

https://test-initial.momagdi.com/api/products?category=insurance&price_from=50000

https://test-initial.momagdi.com/api/products?price_from=150000&price_to=250000