refactored example request

This commit is contained in:
2026-04-03 14:35:12 +02:00
parent 499da81b26
commit 2c1a0cbff3
2 changed files with 11 additions and 22 deletions
@@ -36,22 +36,4 @@ class MoveProjectTicketRequest extends FormRequest
'redirect_to' => ['required', 'string', Rule::in(['backlog', 'board'])],
];
}
public function boardColumnId(): ?int
{
$boardColumnId = $this->validated('board_column_id');
if ($boardColumnId === null || $boardColumnId === '') {
return null;
}
return (int) $boardColumnId;
}
public function redirectRouteName(): string
{
return $this->validated('redirect_to') === 'backlog'
? 'projects.backlog.index'
: 'projects.board.index';
}
}