This is the backend API for the Task Todo Tracker app, built with Laravel.
- PHP >= 8.1
- Composer
- MySQL or compatible database
- Clone the repository and enter the backend folder:
cd task-todo-tracker-api - Install dependencies:
composer install
- Copy the example environment file and configure your database credentials:
cp .env.example .env # Edit .env to set DB_DATABASE, DB_USERNAME, DB_PASSWORD - Generate the application key:
php artisan key:generate
- Run database migrations and seeders:
php artisan migrate --seed
- Start the development server:
The API will be available at
php artisan serve
http://localhost:8000.
- API routes are defined in
routes/api.php. - Main models:
app/Models/Task.php,TaskTime.php,User.php. - Authentication uses Laravel Sanctum (
config/sanctum.php).
-
Run tests:
php artisan test # or vendor/bin/phpunit
-
Run migrations:
php artisan migrate
-
Seed database:
php artisan db:seed
-
Drop all tables, re-run all migrations, and re-seed the database
php artisan migrate:fresh --seed
app/Models/— Eloquent modelsapp/Http/Controllers/— API controllersroutes/api.php— API endpointsdatabase/migrations/— DB schemadatabase/seeders/— Seed data
- The frontend communicates with this backend via REST endpoints.
- Ensure CORS settings in
config/cors.phpallow requests from the frontend.
For more details, see the Laravel documentation: https://laravel.com/docs