Skip to content

brainplusplus/laravel-rest-api-jwt-tdd

Repository files navigation

Laravel REST API using JWT and TDD

Laravel REST API using JWT and TDD Starter. Based on my tutorial https://muhammadtriwibowo.medium.com/laravel-rest-api-with-jwt-and-tdd-dc5c84067658

Installation

  • Clone this Project
  • Install dependencies using composer
    composer install
  • Copy .env.example to .env, edit your databasa config
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=<your_db_name>
    DB_USERNAME=<your_db_username>
    DB_PASSWORD=<your_db_password>
  • Generate app key
  php artisan key:generate
  • Generate JWT Key
 php artisan jwt:secret
  • Migrate database tables
 php artisan migrate

Run the app

 php artisan serve

Creating Test

Just run command below (for example you want make test for Product)

php artisan make:test ProductTest

Running Testing

Just run command below

php artisan test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published