Task Manager
Objective
For this assignment, you will be demonstrating your understanding of Laravel to create a Task Manager app.
Features
The Task Manager must have the following features:
- Registration form new users
- Login form for existing users
- Logged in user should be able to create new groups
- Logged in user should be able to view all groups that belong to them
- Logged in user should be able to view all tasks of a group that belongs to the selected group
- Logged in user should be able to add new tasks to a group that belongs to them
- Logged in user should be able to mark tasks as completed from a group that belongs to them
- Logged in user should be able to delete task form a group that belongs to them
Project Setup
1. Clone the Repository
Clone this repository from GitHub and use the provided file to complete the assignment.
NOTE
If you are using Laragon, save your repository in the {laragon}/www
directory.
2. Create a Database
To create a database using phpMyAdmin, complete the following instructions.
- Open phpMyAdmin at http://phpmyadmin.test
- Log in to phpMyAdmin using the root username and password
- Click Databases tab
- In the Create database from, enter
task_manager
for the database name. - Click the Create button
3. Install Laravel Dependencies
Install Laravel dependencies using composer
Using the terminal, navigate to the cloned repository directory and enter the following command:
composer install
4. Create Environment File
In the project, find the .env.example
file. Rename the file to be .env
. Update the .env
file to point to the task_manager
database.
Save the file.
5. Generate Key
Using the terminal, enter the following command:
php artisan key:generate
6. Test the site
In the browser, go to: http://task-manager-username.test
NOTE
If you are using Laragon, you will need to click the reload button in the Laragon window. This should automatically create a friendly URL for your Laravel project.
NOTE
If you are using Laragon and your friendly URL is not working, the following solution may work for you.
In the Laragon window, go to Menu > Apache > sites-enabled > your current laravel site
This will open a file in Notes++. From there, you will need to changes two lines, the DocumentRoot
(line 2) and the <Directory>
(line 5). In both lines, update the URL to include /public/
at the end.
7. Add UI Package
Laravel has a UI package that will add a scaffold to your project.
To add the UI package, run the following command:
composer require laravel/ui --dev
8. Add Authentication
Authentication is required for this project. To add authentication, run the following command:
php artisan ui bootstrap --auth
When completed, you will also need to run the following command:
npm install && npm run dev
9. Run the Migration Files
Use the provide migration files to create the database tables for the project.
In the terminal, enter the following command:
php artisan migrate
NOTE
The groups
table will hold each list created by a user. A user can have many groups, but a group can have only one user.
NOTE
The tasks
table will hold each task created by a user for a specific list. A group can have many tasks, but a task can belong to only one group.
NOTE
The name groups
was used instead of lists
to avoid conflict with list
being a reserved word in PHP.
10. Create Models and Controllers
Models and Controllers will need to be created for the two new tables added in the previous step.
To create Models and Controllers, run the following commands:
php artisan make:model Group -c
php artisan make:model Task -c
Requirements
Authentication
For this web application, Laravel authentication should be enabled and utilized.
The web application should do the following:
- Require users to log in before using the application
- Allow new users to register an account
- Restrict users from content seeing content they do not own
Groups Page
The Groups page, which will serve as the home page for the site, will display all the groups created by the current user.
The Groups page should display the following:
- The current user's name
- The number of groups for the current user
- All groups for the current user, which will link to the respective Group page (see below)
- A form for creating new groups
Each group should have
- The ability to change the color and title of the Group
- A delete button to delete the Group
Group Page
The Group page will display all of the tasks for the current group.
The Group page should display the following:
- The name of the Group
- The number of uncompleted tasks
- All tasks for the current group, displaying the uncompleted tasks first.
- A form for creating new tasks
Each task should have:
- A complete button will toggle the completed state of the task
- A delete button will delete a task
Example
A completed version of the assignment can be found at the following:
You may create an account or use the Guest account:
- email: guest@example.com
- password: password
Rubric
Criteria | Pts |
---|---|
Successfully implements authentication | 5 |
Successfully display the user's groups | 5 |
Successfully adds new group when the new group form is submitted | 5 |
Successfully implements group editing | 5 |
Successfully implements group deleting | 5 |
Successfully display all tasks of a group | 5 |
Successfully add a new task when the new task form is submitted | 5 |
Successfully implements task editing | 5 |
Successfully implements task deleting | 5 |
Provides an appealing and intuitive user experience | 5 |
Total | 50 |