This is a simple Todo application that allows users to create, read, update, and delete tasks. The app provides a clean user interface with Bootstrap and offers basic CRUD (Create, Read, Update, Delete) functionality.
- Add Todo: Allows users to create new tasks by providing a subject and description.
- Update Todo: Users can update the subject or description of an existing task.
- Delete Todo: Users can remove a task from the list.
- Search Todo: A search bar to filter tasks based on the subject or description.
- Pagination: The tasks are paginated, allowing users to navigate through pages of Todos.
- Responsive Design: The app is responsive and works well on both desktop and mobile devices.
- Backend: Laravel (PHP framework)
- Frontend: HTML, CSS, JQuery, Bootstrap
- Database: MySQL
- PHP >= 7.4
- Composer
- MySQL
- Node.js (for frontend dependencies)
A simple Todo application built with Laravel for backend and basic frontend assets.
-
Clone the repository to your local machine:
git clone https://github.com/satishsurani/TodoApp-Laravel cd TodoApp-Laravel -
Install PHP dependencies using Composer:
composer install
-
Create a .env file by copying the example configuration:
cp .env.example .env
-
Generate the application key:
php artisan key:generate
-
Set up your MySQL database and update the .env file with your database credentials:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=todoApp DB_USERNAME=root DB_PASSWORD=your_password
-
Run the database migrations:
php artisan migrate
-
Install Node.js dependencies (if you want to work with frontend assets):
npm install
-
Compile the frontend assets:
npm run dev
-
Start the development server:
php artisan serve
The app will be accessible at http://127.0.0.1:8000.
- Add a Todo: Click the "Add Todo" button to open the modal form. Enter a subject and description for your task, then click "Add Todo" to save it.
- Update a Todo: Click the "Update Todo" button next to an existing task to edit the subject or description.
- Delete a Todo: Click the "Delete Todo" button to remove a task from the list.
- Search Todos: Use the search bar to filter tasks based on subject or description.
- Pagination: Use the pagination controls at the bottom of the Todo list to navigate between pages of tasks.
- app/: Contains the backend logic for the Todo app (Controllers, Models).
- resources/views/: Contains the HTML templates for the Todo app (views).
- public/: Contains the assets such as images, stylesheets, and JavaScript files.
- routes/web.php: Defines the routes for the app (CRUD operations).
- database/migrations/: Contains the database migrations for the Todo app schema.
Here are the available routes in the Todo application:
-
GET /: Displays the main page with the list of Todos.
- Route Name:
index - Controller Method:
TodoController@index
- Route Name:
-
POST /insert: Allows you to add a new Todo item.
- Route Name:
insert - Controller Method:
TodoController@store
- Route Name:
-
POST /update/{id}: Allows you to update an existing Todo item by its ID.
- Route Name:
update - Controller Method:
TodoController@update
- Route Name:
-
DELETE /delete/{id}: Deletes a Todo item by its ID.
- Route Name:
delete - Controller Method:
TodoController@destroy
- Route Name:
-
GET /search: Provides search functionality to filter Todos based on subject or description.
- Route Name:
search - Controller Method:
TodoController@search
- Route Name:
If you'd like to contribute to the project:
- Fork the repository.
- Create a new branch (e.g.,
git checkout -b feature-name). - Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature-name). - Create a new pull request.