avored/laravel-ecommerce
Composer 安装命令:
composer create-project avored/laravel-ecommerce
包简介
The AvoRed Ecommerce App
关键字:
README 文档
README
AvoRed an laravel headless e commerce
A headless e commerce GraphQL API which uses Laravel as a backend.
Installation
Backend APP setup
First thing first we will install laravel backend api service. First thing first we will install the laravel app.
composer create-project laravel/laravel avored-backend
cd avored-backend
composer require avored/framework
composer require avored/dummy-data
composer require avored/cash-on-delivery
composer require avored/pickup
Set up your .env values and CORS
To fixed the CORS in your laravel8 app. You can open config/cors.php and replace the code like below in the file.
'allowed_origins' => ['http://localhost:8080'],
Once the .env setup is done then we can install the AvoRed E commerce
php artisan avored:install
php artisan vendor:publish --provider="AvoRed\Framework\AvoRedServiceProvider"
yoursite.com/graphiql
Once the avored/framework has been installed after that we will make sure we setup the CORS to allow access of an graphql api via any frontend.
Frontend APP Setup
git clone https://github.com/avored/laravel-ecommerce avored-frontend
cd avored-frontend
npm install
npm run serve
Installation via Docker
Execute the below command:
git clone https://github.com/avored/docker-dev.git
cd docker-dev
git clone https://github.com/avored/laravel-ecommerce ./src/frontend
docker-compose up -d
docker-compose run --rm composer create-project laravel/laravel:8.6 ./
docker-compose run --rm composer require avored/framework
docker-compose run --rm composer require avored/dummy-data avored/cash-on-delivery avored/pickup
Now setup .env file. Open a avored app .env file which is located at ./src/backend/.env then setup your database and any other env as per your docker-compose.yml file
DB_HOST=mysql
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
Now we just have to install the AvoRed and create an avored admin user account
docker-compose run --rm artisan avored:install
docker-compose run --rm artisan vendor:publish --provider="AvoRed\Framework\AvoRedServiceProvider"
Now we need to setup CORS so frontend application can receive api call from backnd.
Open ./src/backend/config/cors.php then replace the below line
'paths' => ['/graphql', 'sanctum/csrf-cookie'],
'allowed_origins' => ['http://localhost:8060'],
That's It. Now you can visit http://localhost:8060 for frontend and for backend you can visit http://localhost:8050/admin
avored/laravel-ecommerce 适用场景与选型建议
avored/laravel-ecommerce 是一款 基于 TypeScript 开发的 Composer 扩展包,目前已累计 10.15k 次下载、GitHub Stars 达 1.54k, 最近一次更新时间为 2018 年 03 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 avored/laravel-ecommerce 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 avored/laravel-ecommerce 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 avored/laravel-ecommerce 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
Alfabank REST API integration
High-performance, opinionated PHP 8 web framework with O(1) routing, parallel async MySQL, type-safe asset bridge, and React-island frontend
Laravel package for Accurate Online API integration.
The skeleton application for the Geoffrey agent framework.
Shared RCX Laravel DataTables UI and configuration helpers.
统计信息
- 总下载量: 10.15k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1543
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-03-08