This is a simple Todo application built with Laravel and MySQL. It allows users to create, read, update, and delete (CRUD) todo items, manage due dates, and mark items as completed.
- Create new todo items with optional descriptions and due dates
- View a list of all todo items, categorized by completion status
- Update existing todo items
- Delete todo items
- Mark todo items as completed, tracking the completion date
- Tasks are ordered by due date and completed tasks by completion date
For a visual representation of the application, see the example screenshot below:
- PHP 7.3 or higher
- Composer
- MySQL
- Node.js and npm
git clone https://github.com/hjungwoo01/laravel-todo-app.git
cd laravel-todo-app
composer install
npm install
Copy the .env.example
file to .env
and update the database configuration.
cp .env.example .env
Update the .env
file with your database credentials.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=todo_app
DB_USERNAME=root
DB_PASSWORD=your_mysql_root_password
php artisan key:generate
php artisan migrate
php artisan serve
npm run dev
Open your browser and navigate to http://localhost:8000/todos
.
- Create a New Todo: Click on "Create New Todo" and fill out the form.
- View Todos: The homepage lists all todos, ordered by due date and categorized by completion status.
- Edit a Todo: Click on "Edit" next to a todo item, update the form, and save.
- Delete a Todo: Click on "Delete" next to a todo item.
- Mark a Todo as Completed: Click the checkbox next to a todo item. Completed tasks are tracked with a completion date and are moved to the "Completed Tasks" section.
app/Http/Controllers/TodoController.php
: Handles CRUD operations.app/Models/Todo.php
: The Todo model.resources/views/todos
: Blade templates for the application.routes/web.php
: Application routes.database/migrations
: Database migration files.
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - Create a new Pull Request.