Download the PHP package areyi/taskmanager without Composer
On this page you can find all versions of the php package areyi/taskmanager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download areyi/taskmanager
More information about areyi/taskmanager
Files in areyi/taskmanager
Package taskmanager
Short Description A simple task manager for Laravel 5
License BSD 3-Clause
Informations about the package taskmanager
TaskManager
A simple task manager for Laravel
- Simple and extensible
- Method chaining
- Formatter (alpha)
TaskManager is a Laravel package which allows you to create projects, and create tasks. The package is in development stage for time being, and not ready for production uses.
Version
0.3.2
Requirements
- Laravel - version 5 (version 4 <= untested, need help here).
- PHP - version => 5.3
Installation
Download the package as a zip, and then put it on /vendor folder.
Add the following line on your composer.json file, under the psr-4:
After that, register the TaskManagerServiceProvider in the /config/app.php file, under the providers array:
And in the same file, put the TaskManager alias under the aliases array:
And finally, run all the migration files
Usage
First, you must supply with the user_id (which you can get from your favourite authentication managers). This will make sure projects and tasks belongs to the right user.
1. To create a new project:
Try this:
which will return:
2. To create a new task:
You can straightaway creating a task without supplying the project_id if you have created a project before
or you can also chain them to create multiple tasks:
which will return:
and you can also create project and add tasks to it at the same time:
3. Get all projects:
To get all existing projects:
which will returns straightaway:
4. Get all tasks with specified project_id
To get all tasks assign to a project:
which returns:
5. Get the whole thing
You can also get all projects along with their tasks:
6. Delete a project
To delete a project (this will also delete all tasks under the same project):
7. Delete a task
To delete a task:
8. Mark a task as completed
To mark a task as completed:
Formatting
This is still under development! TaskManager is included with a powerful formatter, allowing you to edit or delete projects/tasks and complete a task on the run. The formatter is powered by AJAX.
1. Get all projects as list
To list all projects as a list
Result:
- Web Development Project (by admin) Delete
- Test Project (by admin) Delete
2. Get all tasks as list
To list all tasks under a project as a list
Result:
- Buy a milk Complete
- Buy a book Complete
List of available routes
These are the available routes in the package:
Route | Uses |
---|---|
GET /taskmanager/list/all | List all projects and tasks |
GET /taskmanager/list/projects | List all projects |
GET /taskmanager/list/project/{project_id} | Get a project with the given project id |
GET /taskmanager/list/tasks/{project_id} | Get tasks associated with the project id |
GET /taskmanager/delete/project/{project_id} | Delete the project |
GET /taskmanager/delete/task/{task_id} | Delete the task |
GET /taskmanager/complete/task/{task_id} | Mark the task as completed |
List of avaiable methods
These are the methods in the package:
Method | Uses |
---|---|
TaskManager::setUserId($userId); | Set the ownership for all projects and tasks |
TaskManager::addProject($project_details); | Create a new project |
TaskManager::addTask($task_details); | Add a new task |
TaskManager::getProjects(); | Get all projects |
TaskManager::getProject($project_id); | Get a project by given project_id |
TaskManager::getTasks(); | Get all tasks |
TaskManager::getTask($project_id); | Get a task by given project_id |
TaskManager::getAll(); | Get all projects and their tasks |
TaskManager::deleteProject($projectId); | Delete a project |
TaskManager::deleteTask($taskId); | Delete a task |
TaskManager::completeTask($taskId); | Mark a task as done |
TaskManager::format(); | (todo) |
Todos
- Formatter (50%)
License
BSD 3-Clause
Contributions
Feel free to contribute to the project! It will be much appriciated! And most importantly, its a Free Software, Hell Yeah!