A simple CRUD (Create, Read, Update, Delete) application built using Laravel 12 with the official React starter kit. This project serves as a playground to explore the integration of Laravel's backend capabilities with a React frontend.
- Backend: Laravel 12 with RESTful API endpoints for CRUD operations.
 - Frontend: React-based UI powered by the Laravel React starter kit.
 - Database: MySQL
 - Authentication: Laravel authentication .
 - CRUD functionality for managing simple posts.
 
Before you begin, ensure you have the following installed:
- PHP 8.2 or higher
 - Composer
 - Node.js (v16.x or higher) and npm
 - Git
 - MySQL (or another database supported by Laravel)
 - Laravel CLI (optional, for convenience)
 
Follow these steps to set up the project locally:
- 
Clone the Repository
git clone https://github.com/ManushaUm/laravel12-CRUD-application.git cd [your-repo-name] - 
Install Backend Dependencies
composer install
 - 
Install Frontend Dependencies
npm install
 - 
Set Up Environment
- Copy the 
.env.examplefile to.env:cp .env.example .env
 - Update the 
.envfile with your database credentials and other configurations (e.g.,DB_DATABASE,DB_USERNAME,DB_PASSWORD). 
 - Copy the 
 - 
Generate Application Key
php artisan key:generate
 - 
Run Migrations
php artisan migrate
 - 
Compile Frontend Assets
npm run dev
 - 
Start the Development Server
- Run Laravel’s built-in server:
php artisan serve
 - In a separate terminal, run the React dev server (if needed, depending on setup):
npm run watch
 
 - Run Laravel’s built-in server:
 - 
Access the Application
- Open your browser and visit 
http://localhost:8000. 
 - Open your browser and visit 
 
app/Http/Controllers: API controllers for CRUD operations.resources/js: React components and frontend logic.routes/api.php: API routes for CRUD endpoints.database/migrations: Database schema definitions.
- Create: Add a new [resource] via the React frontend.
 - Read: View a list of [resources] or a single [resource] detail.
 - Update: Edit existing [resources].
 - Delete: Remove [resources] from the system.
 
- To build assets for production:
npm run build
 - To run tests (if implemented):
php artisan test 
Feel free to fork this repository, submit pull requests, or open issues for bugs and feature requests.
This project is open-source and licensed under the MIT License.