Skip to content

Laravel todo api using sanctum ( login / logout + CRUD)

Notifications You must be signed in to change notification settings

coswat/todo-api

Repository files navigation

Todo Api With Authentication

simple todo api with authentication using Laravel framework, if you find any issues or bugs you can report to us

Usage

Setup the repository

git clone https://github.com/coswat/todo-api.git
cd todo-api
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-todo;
exit;

Setup your database credentials in the .env file

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel-todo
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

Animated footer bars


Back to top

Releases

No releases published

Packages

No packages published

Languages