Skip to main content
The backend follows the standard Laravel MVC pattern. Routes are defined in routes/web.php, requests are handled by controllers in app/Http/Controllers/, and data access is managed by Eloquent models in app/Models/.

MVC structure

Route table

All routes are defined in routes/web.php. Routes under the auth middleware group require the user to be authenticated.
Authentication routes (login, register, password reset, email verification) are loaded from routes/auth.php via the require at the bottom of web.php. This file is scaffolded by Laravel Breeze and is not shown here.

Middleware stack

auth middleware

All task-related routes and profile routes are wrapped in Route::middleware('auth')->group(...). This middleware redirects unauthenticated requests to the login page. The TaskController itself does not apply any additional middleware — protection is entirely route-level.

verified middleware

The /dashboard route adds the verified middleware, which requires the authenticated user’s email address to have been verified. The User model has email_verified_at nullable, so verification is possible but not enforced for task routes.

TaskController

app/Http/Controllers/TaskController.php handles all four CRUD operations for tasks.

Method details

Returns all tasks where completed = 0 as a JSON array. Does not filter by the authenticated user — all pending tasks across all users are returned.
Response: 200 OK — JSON array of task objects.
This endpoint returns tasks for all users, not just the authenticated user. There is no scoping by auth()->id().

Inertia.js usage

Inertia.js (inertiajs/inertia-laravel ^1.0) is used for two server-rendered pages:
The root route closure in routes/web.php calls Inertia::render('Auth:Login', ...) with a colon separator — this is a typo in the source. The actual AuthenticatedSessionController@create correctly renders Auth/Login (forward slash). The login page is functional because /login uses the controller, while / uses the closure with the typo.
These Inertia pages are separate from the Vue task list. The task list at GET /tasks returns a classic Blade view (resources/views/tasks.blade.php) which embeds the #app element that the Vue app mounts onto.
Inertia.js acts as a bridge between Laravel controllers and front-end components. The server returns an Inertia response (JSON with component name + props) instead of a full HTML page, and the Inertia client swaps the component without a full page reload.