A Laravel REST API for managing tasks with user authentication, validation, and database operations.
- User authentication (register/login/logout)
- Bearer token-based authorization (Laravel Sanctum)
- Complete task management (CRUD operations)
- Task prioritization (low, medium, high)
- Task status tracking (pending, in_progress, completed)
- Due date management
- Data validation
- Error handling with meaningful responses
- Laravel 12 - PHP web framework
- PHP 8.3+ - Server-side language
- SQLite - Database
- Laravel Sanctum - API authentication
- Eloquent ORM - Database abstraction
- PHP 8.3+
- Composer
- SQLite
# Clone and install
git clone <repository>
cd task-api-crud
composer install
# Setup environment
cp .env.example .env
php artisan key:generate
# Database setup
touch database/database.sqlite
php artisan migrate
# Start server
php artisan serve
# Runs on http://127.0.0.1:8000POST /auth/register- Create new accountPOST /auth/login- User loginPOST /auth/logout- User logout
GET /tasks- List all tasksPOST /tasks- Create taskGET /tasks/{id}- Get task detailsPUT /tasks/{id}- Update taskDELETE /tasks/{id}- Delete task
All task endpoints require authentication header: Authorization: Bearer {token}
For detailed API documentation, see README_API.md
Users Table: id, name, email, password, created_at, updated_at
Tasks Table: id, user_id, title, description, status, priority, due_date, is_completed, created_at, updated_at
MIT
For issues or questions, please contact me me@sagorislam.dev or open an issue in the repository.