Tasks
Description
Tasks is Enso's internal task management backend.
The package stores tasks allocated between users, supports reminders and overdue detection, exposes create/edit/table/export endpoints, publishes websocket channels for live task updates and task counters, and sends queued reminder notifications to assignees.
Installation
Install the package:
composer require laravel-enso/tasks
Run the migrations:
php artisan migrate
The package merges config/tasks.php, where you can restrict the roles that may be selected as task assignees.
Features
- CRUD endpoints for tasks, plus table bootstrap, table data, and Excel export.
- Visibility rules based on ownership, assignee, and superior roles.
- Reminder and overdue scopes on the
Taskmodel. - Queued reminder notifications through
TaskNotification. - Broadcast channels for per-user task streams and global task updates.
- Dynamic taskable payload generation through
TaskableFactory.
Usage
Task routes are registered under:
- prefix:
api/system/tasks - name prefix:
system.tasks. - middleware:
api,auth,core
Key endpoints:
GET createPOST /GET {task}/editPATCH {task}DELETE {task}GET initTableGET tableDataGET exportExcelGET countGET users
The core model is LaravelEnso\Tasks\Models\Task.
Useful relationships and methods:
allocatedTo()remind()overdue(): bool
Useful scopes:
visible()pending()completed()overdue()notReminded()
Broadcast channels:
tasks.{userId}task-updates
Configuration:
return [
'roles' => ['*'],
];
Use a narrowed list when only certain roles should be assignable.
API
This package exposes its backend integration through the routes, controllers, services, jobs, and configuration points referenced in the usage examples above.
Consumers should rely on the published config keys, documented route groups, and explicit service classes shown in the examples. Internal helper classes, listeners, casts, and background jobs are implementation details unless the README calls them out as extension points.
Depends On
Required Enso packages:
laravel-enso/core↗laravel-enso/dynamic-methods↗laravel-enso/forms↗laravel-enso/helpers↗laravel-enso/tables↗
Companion frontend package:
Contributions
are welcome. Pull requests are great, but issues are good too.
Thank you to all the people who already contributed to Enso!