This source code demonstrates how to use JWTs with Laravel and Vue JS.
Laravel version 5.5
- Laravel server requirements
- Laravel 5.5 requires PHP 7.0 or later
- Clone the repository
- Run
composer install - Configure Laravel directory permissions (documentation)
- Create a database and setup the database configuration inside
.env - Run
php artisan key:generate - Run
php artisan migrate - Run
php artisan jwt:secret - Run
npm install - Use
php artisan tinkerto create a test user:
App\User::create(['name' => 'Test User', 'email' => '[email protected]', 'password' => Hash::make('Password01')])
- Once you have made changes to the JavaScript or SCSS files you will want to run
npm run devornpm run production
