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
php artisan migrate
run seeder
php artisan db:seeder --class=DatabaseSeeder
run the following command
composer run dev
- Email : [email protected] | [email protected] | [email protected] | [email protected] | [email protected]
- Password : password
GET /api/user/list
GET /api/user/list/{id}
Parameter | Type | Description. |
---|---|---|
id |
int |
Required. |
POST /api/user/list/post
Request Body. | Type | Description |
---|---|---|
name |
string |
Required. |
email |
string |
Required. |
password |
string |
Required. |
role_id |
integer |
Required. |
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. |
GET /api/user/role-permission
GET /api/user/role-permission/{id}
Parameter | Type | Description. |
---|---|---|
id |
int |
Required. |
POST /api/user/role-permission/post
Request Body. | Type | Description |
---|---|---|
role_name |
string |
Required. |
menu_id[] |
string |
Required array format. |
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. |
GET /api/user/menu
GET /api/user/menu/{id}
Parameter | Type | Description. |
---|---|---|
id |
int |
Required. |
POST /api/user/menu/post
Request Body. | Type | Description |
---|---|---|
menu_name |
string |
Required. |
route |
string |
Required. |
parent_menu_id |
string |
Required. |
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. |
DELETE /api/user/menu/delete/{id}
Parameter | Type | Description. |
---|---|---|
id |
int |
Required. |