Title here
Summary here
Northwind staff need to add tasks, not only list them.
createAction with table('tasks')->save()task.list callIn services/TaskService.php:
use Pionia\Exceptions\ValidationException;
protected function createAction(Arrayable $data): ApiResponse
{
$title = $data->getString('title');
if ($title === null || trim($title) === '') {
throw new ValidationException('title is required');
}
$task = table('tasks')->save([
'title' => trim($title),
'status' => $data->getString('status', 'open'),
'assignee' => $data->getString('assignee', 'alex@northwind.studio'),
]);
return response(0, 'Task created', ['task' => $task]);
}curl -s -X POST http://127.0.0.1:8000/api/v1/ \
-H "Content-Type: application/json" \
-d '{"service":"task","action":"create","title":"Ship DeskFlow tutorial"}'Run task.list again — your new row appears.
Milestone: You now have read + write against SQLite. Step 8 replaces inline checks with declarative validation.
ValidationException, not plain Exception.