Create the following routes, models, controllers
- first_name - string
- last_name - string
- age - integer
- dept - string
- is_active - boolean (default -0)
First create a migration php artisan make:migration create_peoples_table
Define the people schema as mentioned above
Next create a model php artisan make:model People
Next create a controller for people php artisan make:controller PeopleController
- name - string
- code - string
- is_active - boolean (default -0)
First create a migration php artisan make:migration create_departments_table
Define the department schema as mentioned above
Next create a model php artisan make:model Department
Next create a controller for people php artisan make:controller DepartmentController
-
GET
/peopleList the people in peoples tables as array -
POST
/peopleAdd a new people into Peoples table -
GET
/departmentList the departments in department tables as array -
POST
/departmentAdd a new department into departments table