A headless e commerce GraphQL API which uses Laravel as a backend.
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.
git clone https://github.com/avored/laravel-ecommerce avored-frontend
cd avored-frontend
npm install
npm run serve
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


免费创建高清无水印Sora视频
Vora是一个免费创建高清无水印Sora视频的AI工具


最适合小白的AI自动化工作流平台
无需编码,轻松生成可复用、可变现的AI自动化工作流

大模型驱动的Excel数据处理工具
基于大模型交互的表格处理系统,允许用户通过对话方式完成数据整理和可视化分析。系统采用机器学习算法解析用户指令,自动执行排序、公式计算和数据透视等操作,支持多种文件格式导入导出。数据处理响应速度保持在0.8秒以内,支持超过100万行数据的即时分析。


AI辅助编程,代码自动修复
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。