Title here
Summary here
You add the first DeskFlow feature: list tasks for Northwind Studio.
TaskService with the CLIlistAction → "action": "list"task alias on MainSwitchphp pionia make:service taskChoose Basic. Edit services/TaskService.php:
<?php
namespace Application\Services;
use Pionia\Collections\Arrayable;
use Pionia\Http\Response\ApiResponse;
use Pionia\Http\Services\Service;
class TaskService extends Service
{
protected function listAction(Arrayable $data): ApiResponse
{
return response(0, 'OK', [
'tasks' => [
[
'id' => 1,
'title' => 'Review homepage mockups',
'status' => 'open',
'assignee' => 'alex@northwind.studio',
],
],
]);
}
}switches/MainSwitch.php:
return arr([
'welcome' => WelcomeService::class,
'task' => TaskService::class,
]);curl -s -X POST http://127.0.0.1:8000/api/v1/ \
-H "Content-Type: application/json" \
-d '{"service":"task","action":"list"}'Hardcoded data is intentional — Step 6 moves this to SQLite.
service not found — typo in alias 'task' or missing use TaskService.listAction, JSON uses "list".