Laravel REST API using JWT and TDD Starter. Based on my tutorial https://muhammadtriwibowo.medium.com/laravel-rest-api-with-jwt-and-tdd-dc5c84067658
- 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
Just run command below (for example you want make test for Product)
php artisan make:test ProductTest
Just run command below
php artisan test