Laravel-ecommerce

laravel-ecommerce

제품 정보

즐겨찾기

오픈소스 사용 사례

공개 채팅

지원 계획

현재 사용할 수 있는 OSS 플랜이 없습니다.

저장소의 제공자 또는 기여자인 경우 OSS 플랜 추가를 시작할 수 있습니다.

OSS 플랜 추가
여기에서 자세히 알아보세요

이 오픈소스에 대한 플랜을 찾고 있다면 저희에게 문의해 주세요.

전문 공급자와 연락하실 수 있도록 도와드리겠습니다.

제품 세부 정보

AvoRed an Open Source Laravel Shopping Cart

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

문의하기

  • 비즈니스 개발자를 위한 최신 정보를 원하십니까? 소스 코드 프로젝트에 대한 PieceX 커뮤니티의 요구사항을 알아보세요. PieceX의 최신 무료 커뮤니티 코드를 빠르게 알려드립니다.
PieceX Logo