This is the official repository for my Laravel Sanctum - tutorial which is available on YouTube.
• Author: Code With Dary
• Twitter: @codewithdary
• Instagram: @codewithdary
The following additional tools will be used during this tutorial
- Laravel Sanctum for an authentication system
- Postman for our Laravel API
- Database Client to have a look inside our database
Setup the repository
git clone [email protected]:codewithdary/laravel-sanctum-tutorial.git
cd laravel-sanctum-tutorial
composer install
cp .env.example .env
php artisan key:generate
php artisan cache:clear && php artisan config:clear
php artisan serve
mysql;
create database laravel-sanctum-tutorial;
exit;
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel-sanctum-tutorial
DB_USERNAME={USERNAME}
DB_PASSWORD={PASSWORD}
Before you can use Laravel Sanctum, you obviously need to make sure that you install it through Composer. Besides that, you should upblish the Sanctum configuration file as well.
composer require laravel/sanctum
php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"
php artisan migrate
Thanks to Laravel for giving me the opportunity to make this tutorial on Laravel Sanctum.