Skip to content

gimwachan-git/laravel9-react-vite-inertiajs-docker

Repository files navigation

laravel9-React-inertiajs-docker

It is a simple project to show how to use react in laravel by using inertiajs and vite in docker.

How to Use

create env file

copy .env.example and rename to .env

run docker

docker compose -f .docker/docker-compose.yml -p laravel-react up --build

Use in Container

update key

php artisan key:generate

create DB

php artisan migrate

restart docker

docker stop laravel-react
docker start laravel-react

other doacker command

docker compose -f .docker/docker-compose.yml -p laravel-react down
docker compose -f .docker/docker-compose.yml -p laravel-react build
docker compose -f .docker/docker-compose.yml -p laravel-react up

Introduction

In /routes, there are some example for creating route in laravel.

In http://0.0.0.0:8000/users, there is a page for showing how to get data from server side by useing UserController(/app/Http/Controllers/Controller.php)

In http://0.0.0.0:8000/users/create, there is a page for showing how to post data to server side by useing UserController(/app/Http/Controllers/Controller.php)

http://0.0.0.0:8000/react-dashboard is a example for React Router

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages