Create a RESTFUL API for performing CRUD operations on a Country resource using laravel PHP framework.
- Copy the
.env.examplefile to.envand edit the details for your environment - Run
composer installto install all php dependencies - Create your database and set the proper environment variables in your
.envfile. - Run
php artisan migrate --seedto get the database up and running - Run
php artisan jwt:secretto set jwt secret
POST - /signup
payload => {
'username' => ,
'email' => ,
'first_name' => ,
'last_name' => ,
'password' => ,
}
POST - /login
payload => {
'email' => ,
'password' => ,
}
POST - /countries
payload => {
'name' => ,
'continent' => ,
}
PUT - /countries/:id
payload => {
'name' => ,
'continent' => ,
}
DELETE - /countries/:id
payload => none
GET - /countries
payload => none
POST - /activities
payload => none
run php vendor/phpunit/phpunit/phpunit in Command line/terminal