https://github.com/coswat/todo-api
Laravel todo api using sanctum ( login / logout + CRUD)
https://github.com/coswat/todo-api
api laravel open-source todo-api-php token-based-authentication
Last synced: 6 months ago
JSON representation
Laravel todo api using sanctum ( login / logout + CRUD)
- Host: GitHub
- URL: https://github.com/coswat/todo-api
- Owner: coswat
- Created: 2023-01-30T18:24:33.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-13T22:37:43.000Z (over 2 years ago)
- Last Synced: 2025-04-04T17:51:48.998Z (7 months ago)
- Topics: api, laravel, open-source, todo-api-php, token-based-authentication
- Language: PHP
- Homepage:
- Size: 95.7 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### 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
```
