A simple Task Manager application built with Laravel that allows users to perform basic CRUD operations on tasks.
composer --version
composer create-project --prefer-dist laravel/laravel task-manager
cd task-manager
.env
file for SQLite:DB_CONNECTION=sqlite
DB_DATABASE=database/database.sqlite
touch database/database.sqlite
tasks
table:php artisan make:migration create_tasks_table
title
, description
, completed
, and timestamps.php artisan migrate
Task
model:php artisan make:model Task
TaskController
:php artisan make:controller TaskController
index
, create
, store
, edit
, update
, destroy
) in the controller.routes/web.php
:use App\Http\Controllers\TaskController;
Route::get('/tasks', [TaskController::class, 'index'])->name('tasks.index');
Route::get('/tasks/create', [TaskController::class, 'create'])->name('tasks.create');
Route::post('/tasks', [TaskController::class, 'store'])->name('tasks.store');
Route::get('/tasks/{task}/edit', [TaskController::class, 'edit'])->name('tasks.edit');
Route::put('/tasks/{task}', [TaskController::class, 'update'])->name('tasks.update');
Route::delete('/tasks/{task}', [TaskController::class, 'destroy'])->name('tasks.destroy');
index.blade.php
to display all tasks.create.blade.php
for adding new tasks.edit.blade.php
for updating tasks.store
and update
methods of TaskController
:title
: Required, max 255 characters.description
: Optional.completed
: Boolean.layouts/app.blade.php
.php artisan serve
http://localhost:8000/tasks
.This README.md
provides a concise guide to setting up and running the Task Manager application. For detailed code, refer to the respective files in the project.