Built on Laravel 10, this boilerplate provide base skeleton for API Development using Laravel Framework.
- API Authentication using JSON Web Token (JWT)
- Role using Spatie Laravel Permission
- Ready to custom base API skeleton
- Clone this repository
https://github.com/bengkelkoding/Api-Boilerplate.git
- Open the folder cloned from this repo
- Run
composer install
to install any required dependencies, wait until done - Copy file
.env.example
, paste in the same folder and rename it to.env
- Run command
php artisan key:generate
andphp artisan jwt:secret
- Edit the database configuration in
.env
file based on what you need on this segment
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_pass
- Run the
php artisan migrate
to migrate the tables into your database. Make sure your MySQL instance is up and running. - Run
php artisan db:seed
to insert the existing dummy data - Run the program locally using
php artisan serve
command