https://github.com/derek486/employee-app-laravel
Web application to employees | laravel
https://github.com/derek486/employee-app-laravel
laravel mysql sanctum-authentication
Last synced: about 1 month ago
JSON representation
Web application to employees | laravel
- Host: GitHub
- URL: https://github.com/derek486/employee-app-laravel
- Owner: Derek486
- License: mit
- Created: 2023-05-20T05:46:51.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-24T23:47:34.000Z (about 1 year ago)
- Last Synced: 2025-03-25T00:27:58.934Z (about 1 year ago)
- Topics: laravel, mysql, sanctum-authentication
- Language: PHP
- Homepage:
- Size: 83 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Employees App
This is a **Laravel-based Employee Management System** that allows users to register, authenticate, and manage employee records.
## 🚀 Features
- **User Authentication** (Register, Login, Logout)
- **CRUD Operations for Employees** (Create, Read, Update, Delete)
- **Middleware for Authentication** to protect routes
- **MySQL Database Integration**
## 🛠Tech Stack
- **Backend:** Laravel
- **Database:** MySQL
- **Authentication:** Laravel Auth
- **Routing:** Laravel Web Routes
## 📦 Installation
### Prerequisites
Ensure you have **PHP**, **Composer**, **MySQL**, and **Laravel** installed:
```sh
composer install
```
### Clone the repository
```sh
git clone https://github.com/your-username/employees-app.git
cd employees-app
```
### Set up environment variables
Copy `.env.example` to `.env` and update database credentials:
```env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=12345678
```
### Run migrations
```sh
php artisan migrate
```
### Start the server
```sh
php artisan serve
```
Access the application at `http://127.0.0.1:8000`.
## 📂 API Routes
| Method | Route | Description |
|--------|-------|-------------|
| **GET** | `/register` | Show registration form |
| **POST** | `/register` | Register a new user |
| **GET** | `/login` | Show login form |
| **POST** | `/login` | Authenticate user |
| **POST** | `/logout` | Log out user |
| **GET** | `/employees` | List all employees |
| **POST** | `/employees` | Create a new employee |
| **GET** | `/employees/{id}` | Show employee details |
| **PUT** | `/employees/{id}` | Update employee information |
| **DELETE** | `/employee/{id}` | Delete an employee |
## 📸 Preview
Here are some screenshots of the project in action:
### Employee List

### Update Form

### Login and register
## 📜 License
This project is licensed under the **MIT License**. Feel free to use and modify it!