PHP code example of areyi / taskmanager
1. Go to this page and download the library: Download areyi/taskmanager library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
areyi / taskmanager example snippets
'Areyi\TaskManager\Laravel\TaskManagerServiceProvider'
'TaskManager' => 'Areyi\TaskManager\Facades\TaskManager'
$user_id = 1; // get from your login manager
TaskManager::setUserId($user_id);
$task_details = [
'name' => 'New Task'
];
TaskManager::addTask($task_details);
TaskManager::addTask($task_details)->addTask($task2_details)->addTask($task3_details);
TaskManager::addProject($project_details)->addTask($task_details)->addTask($task_details);
TaskManager::getProjects();
$project_id = 1;
TaskManager::getProject($project_id)->getTasks();
TaskManager::getAll();
$projectId = 1;
TaskManager::deleteProject($projectId);
$task_id = 1;
TaskManager::deleteTask($task_id);
TaskManager::completeTask($task_id)
TaskManager::getProjects()->format()->asList();
$project_id = 1;
TaskManager::getProject($project_id)->getTasks()->format()->asList();
sh
php artisan migrate --path=vendor/areyi/taskmanager/src/database/migrations