Laravel + React Demo

This application is a simple demo for the react.js (javascript) as front end and Laravel framework (PHP) as backend. For the current setup, database used is mysqlite.

App Specifications

Laravel Framework 8.83.27 PHP 7.3 React.js 17.0.2

Requirements

PHP 7.3 and above Composer 2.0 and above NPM 8

How to setup / install

  1. Clone this repo. git clone https://github.com/Syirasky/laravel-react-demo.git
  2. Enter the cloned repo directory cd laravel-react-demo
  3. Run composer install to install all the required dependency for Laravel
  4. Run npm install to install all the required dependency for React.js
  5. Configure the .env file to use sqlite (see below for the example .env). Just set the database config as follows,
DB_CONNECTION=sqlite
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE='../database/database.sqlite'
DB_USERNAME=
DB_PASSWORD=
  1. Run php artisan migrate
  2. Run php artisan serve
  3. If you have error regarding the Laravel key, just click generate and then re-run php artisan serve
  4. If you have error regarding the sqlite database not found, edit the .env file and change the database to ../database/database.sqlite

Screenshots

Front page, list of cards.

Assigning cards to player page. image

Assigned cards details image