Coder Social home page Coder Social logo

shahzaib-943 / task-management-app Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 97 KB

The Task Manager project is a web application built with Laravel, designed to manage tasks. It allows users to create, edit, delete tasks, mark tasks as done, and prioritize tasks.

PHP 67.94% JavaScript 0.26% SCSS 0.22% Blade 31.58%

task-management-app's Introduction

Task Manager Project

___

Overview

The Task Manager project is a web application built with Laravel, designed to manage tasks. It allows users to create, edit, delete tasks, mark tasks as done, and prioritize tasks.

Features

  • Task Listing: Display a list of tasks with details such as title, description, priority, due date, and status.
  • Task Creation: Users can add new tasks to the system, specifying details like title, description, priority, and due date.
  • Task Update: Edit existing tasks to modify their details.
  • Task Deletion: Remove unwanted tasks from the system.
  • Mark as Done: Change the status of a task to "done."
  • Priority Sorting: Tasks are listed by priority, with the ability to identify the most repeated priority.

Getting Started


  • Clone the repository: git clone <repository_url>
  • Install dependencies: composer install and npm install
  • Copy .env.example to .env and configure your database settings
  • Generate application key: php artisan key:generate
  • Run migrations: php artisan migrate
  • Start the development server: php artisan serve

Routes


Task Routes

  • List Tasks: /tasks - Displays a paginated list of tasks.
  • Create Task: /tasks/create - Form to add a new task.
  • Edit Task: /tasks/{task}/edit - Form to edit an existing task.
  • Update Task: POST /tasks/{task} - Update an existing task.
  • Delete Task: DELETE /tasks/{task} - Delete an existing task.
  • Mark as Done: POST /tasks/{task}/status - Mark a task as done.

Priority Routes


  • Most Repeated Priority: /tasks/most-repeated-priority Displays tasks with the most repeated priority.

  • Route Binding Update and Delete Routes The project utilizes route model binding for task updates and deletions. When accessing routes that require a task ID, the application automatically binds the corresponding Task model instance.

Examples:

  • Update Task Route:

  • php Copy code // In the routes file Route::get('/tasks/{task}/edit', 'TaskController@edit')->name('tasks.edit'); Route::post('/tasks/{task}', 'TaskController@update')->name('tasks.update'); php Copy code // In the controller public function edit(Task $task) { // $task is automatically populated with the corresponding Task model instance return view('tasks.edit', compact('task')); }

Delete Task Route:

  • php Copy code // In the routes file Route::delete('/tasks/{task}', 'TaskController@destroy')->name('tasks.destroy'); php Copy code // In the controller public function destroy(Task $task) { // $task is automatically populated with the corresponding Task model instance $task->delete(); // Additional logic... } Custom Requests To validate incoming request data, custom Request classes have been created.

Create Task Request:

  • php Copy code // In the controller public function store(CreateTaskRequest $request) { // The CreateTaskRequest class handles validation // If validation fails, the user is redirected back with validation errors // If validation passes, the controller logic is executed // ... }

  • Update Task Request:

  • php Copy code // In the controller public function update(UpdateTaskRequest $request, Task $task) { // The UpdateTaskRequest class handles validation // If validation fails, the user is redirected back with validation errors // If validation passes, the controller logic is executed // ... }


Author


M. Shahzaib

task-management-app's People

Contributors

shahzaib-943 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.