Step1- Open command prompt or Git Bash on xampp/htdocs directory
Step2- Create Laravel New Project write this command
composer create-project –prefer-dist laravel/laravel scmgalaxy “5.5.*”![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/1.jpg)
Step3- Move to project directory on git bash
cd scmgalaxy![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/2.jpg)
Step4- Project directory on git bash on this command
composer require laravel/passport
![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/3.jpg)
Step5- Create Database in Mysql Server
![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/6-1024x393.jpg)
Step5- Set Mysql Server Username ,Password and Database Name in .env file
DB_DATABASE=microservices DB_USERNAME=root DB_PASSWORD=![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/7.jpg)
Step6-scmgalaxy\app\user.php add in user model this code
use Laravel\Passport\HasApiTokens; use HasApiTokens, Notifiable;![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/8.jpg)
Step8- scmgalaxy\app\Providers\AppServiceProvider add in this code
use Laravel\Passport\Passport;![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/8-1.jpg)
Step8- config\auth.php add in this code
‘api’ => [ ‘driver’ => ‘passport’, ‘provider’ => ‘users’, ],![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/8-2-1024x635.jpg)
Step9- scmgalaxy\app\Http\Kernel.php add this code
‘client_credentials’ => \Laravel\Passport\Http\Middleware\CheckClientCredentials::class,![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/8-3-1024x366.jpg)
Step9- scmgalaxy\config\app.php add this code
Laravel\Passport\PassportServiceProvider::class,![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/8-4-1024x500.jpg)
Step10- Project directory on git bash on this command
composer update![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/8-5.jpg)
Step11- Project directory on git bash on this command
php artisan make:auth![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/8-6.jpg)
Step12- Project directory on git bash on this command
php artisan migrate![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/8-7.jpg)
Step13- Project directory on git bash on this command
php artisan passport:install![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/8-8.jpg)
[…] How to create new microservices in Laravel framework […]