Language: PHP 8.3
Framework: Laravel 11
Database: MySQL | PostgreSQL
Login
Registrasi Pengguna
Logout
Manajemen Pengguna yang terdiri dari
User
Role
Menu
Permission
clone repositories to your local machine
git clone https://github.com/coding-test-history/user-management.git
install dependencies
composer install
npm install && npm run build
run migration
run seeder
php artisan db:seeder --class=DatabaseSeeder
run the following command
1. Retrieve a list of all users.
2. Retrieve details of a specific user.
Parameter
Type
Description.
id
int
Required .
Request Body.
Type
Description
name
string
Required .
email
string
Required .
password
string
Required .
role_id
integer
Required .
4. Update an existing user.
PUT /api/user/list/update/{id}
Parameter
Type
Description.
id
int
Required .
Request Body.
Type
Description
name
string
Required .
email
string
Required .
role_id
integer
Required .
DELETE /api/user/list/delete/{id}
Parameter
Type
Description.
id
int
Required .
1. Retrieve a list of all roles and permission.
GET /api/user/role-permission
2. Retrieve details of a specific role and permission.
GET /api/user/role-permission/{id}
Parameter
Type
Description.
id
int
Required .
3. Create a new role and permission.
POST /api/user/role-permission/post
Request Body.
Type
Description
role_name
string
Required .
menu_id[]
string
Required array format.
4. Update an existing role and permission.
PUT /api/user/role-permission/update/{id}
Parameter
Type
Description.
id
int
Required .
Request Body.
Type
Description
role_name
string
Required .
menu_id[]
string
Required array format.
DELETE /api/user/role-permission/delete/{id}
Parameter
Type
Description.
id
int
Required .
Menu
1. Retrieve a list of all menus.
2. Retrieve details of a specific menus.
Parameter
Type
Description.
id
int
Required .
3. Create a new menu.
Request Body.
Type
Description
menu_name
string
Required .
route
string
Required .
parent_menu_id
string
Required .
4. Update an existing menu.
PUT /api/user/menu/update/{id}
Parameter
Type
Description.
id
int
Required .
Request Body.
Type
Description
menu_name
string
Required .
route
string
Required .
parent_menu_id
string
Required .
5. Delete an menu.
DELETE /api/user/menu/delete/{id}
Parameter
Type
Description.
id
int
Required .