dev-mo-ali / laravel-sanctum-tutorial

This repository is dedicated to my Laravel Sanctum tutorial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel Sanctum Tutorial

This is the official repository for my Laravel Sanctum - tutorial which is available on YouTube.
• Author: Code With Dary
• Twitter: @codewithdary
• Instagram: @codewithdary

Utilities

The following additional tools will be used during this tutorial

Usage

Setup the repository

git clone git@github.com: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 

Database Setup

mysql;
create database laravel-sanctum-tutorial;
exit;

Setup your database credentials in the .env file

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel-sanctum-tutorial
DB_USERNAME={USERNAME}
DB_PASSWORD={PASSWORD}

Sanctum

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"

Migrate tables

php artisan migrate

Credits due where credits due…

Thanks to Laravel for giving me the opportunity to make this tutorial on Laravel Sanctum.

About

This repository is dedicated to my Laravel Sanctum tutorial


Languages

Language:PHP 83.7%Language:Blade 16.0%Language:JavaScript 0.2%