feat: add API routes for authentication and task management

- Created api.php for handling authentication routes (register, login, logout) with token middleware.
- Implemented task management routes using API resource controller.

feat: add console routes for artisan commands

- Added console.php to define an inspiring quote command.

feat: add web routes for homepage

- Created web.php to serve the welcome view at the root URL.

chore: add .gitignore files for storage directories

- Added .gitignore files in storage/app, storage/framework, and storage/logs to exclude unnecessary files from version control.

test: add feature and unit tests

- Created ExampleTest in Feature and Unit directories to verify basic application responses and assertions.

build: add Vite configuration for Laravel and Tailwind CSS

- Added vite.config.js to configure Vite with Laravel and Tailwind CSS for asset management.
This commit is contained in:
2026-06-23 20:33:06 +07:00
commit d62725c5af
72 changed files with 11481 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class TaskResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'title' => $this->title,
'description' => $this->description,
'is_done' => $this->is_done,
'status' => $this->status,
'due_date' => $this->due_date,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at
];
}
}