A Minimal CRUD Application that fetches product list from database from backend and displays it on frontend.
Technologies Used
- Laravel
- React
- Database - SQLite
Installation
-
Navigate to the project directory:
-
Install Composer dependencies:
composer install
-
Copy the example environment file and configure:
cp .env.example .env
-
Generate an application key:
php artisan key:generate
-
Run database migrations:
php artisan migrate
-
Install NPM dependencies:
npm install
-
Start the Vite development server:
npm run dev
-
Running the Project:
php artisan serve
API Routes
The application defines the following routes:
http://127.0.0.1:8000/api/products
Product Management Routes (grouped)
-
/
Displays a list of all products.
-
/products/create
Displays the form to create a new product.
-
/products/{id}/edit
Displays the form to edit an existing product.
-
DELETE
/products/{product}
: Deletes an existing product (products.destroy
)
Notes:
- These routes are controlled by the
ProductController
.