This is a small CRUD application designed to manage "procedures". The application provides a user-friendly interface with the following features:
- Procedure List: View all procedures.
- Create Procedure: Add new procedures by filling out a form with necessary information.
- Edit Procedure: Modify details of an existing procedure.
- Delete Procedure: Remove procedures from the system.
- View Procedure Details: Click on a procedure to see detailed information about it.
Additionally, the app includes a REST API to interact with the procedures data:
- GET /api/procedures: Retrieves all procedures.
- Filter by state: Use the
state
query parameter to filter procedures by their status. The possible states are:pending
: Displays procedures that are in the "pending" state.inprogress
: Displays procedures that are currently in progress.completed
: Displays procedures that are marked as completed.
Example API usage:
/api/procedures?state=inprogress
Before you begin, ensure you have met the following requirements:
- PHP: Version 8.0 or higher.
- Composer: Dependency manager for PHP.
- Database: MySQL, PostgreSQL, SQLite, or SQL Server.
- Web Server: Apache or Nginx.
Note: I used XAMPP to make the local server.
Follow these steps to set up your Laravel application:
-
Clone the repository:
git clone https://github.com/umigam3/laravel-crud.git cd laravel-crud
-
Install Composer dependencies:
composer install
-
Environment setup:
-
Update the
.env
file with your database credentials and other configuration values.DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_database DB_USERNAME=root DB_PASSWORD=
-
-
Run database migrations:
php artisan migrate
-
Run database seeders:
php artisan db:seed
To run the Laravel application locally, use the following command:
php artisan serve
This will start the development server on http://127.0.0.1:8000
. To go to de main page, go to http://127.0.0.1:8000/procedures