Skip to content

engrukairo/apex-api

Repository files navigation

Laravel Logo

Build Status Total Downloads Latest Stable Version License

About This Project

Setup

To use/run this project, first clone it or download the zip file from Github. If you downloaded the zip file, extract all the files to a folder.

Move into the folder containing the files and open your choice terminal. Run the following commands:

  • composer install
  • php artisan key:generate
  • php artisan jwt:generate

Database and Seeding

Now go to your database and create a database named "apexapi". If you are using password to access your database, update the .env file accordingly. After that, run the command:

  • php artisan migrate

to create the database and tables. Then run:

  • php artisan db:seed

The last command will create 10 users to experiment with. Go to your users table in the database and change the role for one of the users to 'admin'. All the users' password is 'password'.

Testing with Postman

Using postman, let's test the routes!

Login with a user's account with the role of a user to test the following routes:

  • /viewallusers
  • /viewuser/2 or any other id - pass the id, name, email and role as body-raw variables
  • /updateuser or any other id

Use a user's account with the role of an admin to test the following routes:

  • /deleteuser/2 or any other id

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published