PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Zacchaeus Bolaji  >  NatterBase PHP Get Country API  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: NatterBase PHP Get Country API
API to get information about countries
Author: By
Last change:
Date: 1 year ago
Size: 1,023 bytes
 

Contents

Class file image Download

natterbase

Create a RESTFUL API for performing CRUD operations on a Country resource using laravel PHP framework.

Getting Started

  • Copy the `.env.example` file to `.env` and edit the details for your environment
  • Run `composer install` to install all php dependencies
  • Create your database and set the proper environment variables in your `.env` file.
  • Run `php artisan migrate --seed` to get the database up and running
  • Run `php artisan jwt:secret` to set jwt secret

Routes

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

Unit Tests

run php vendor/phpunit/phpunit/phpunit in Command line/terminal

For more information send a message to info at phpclasses dot org.