(05-08-2023, 09:15 PM)kenjis Wrote: I think the checkPost() method is not good.
It should return boolean.
> breaking out of a controller in CI4 is hard
Yes, because a controller must return a response.
Just thinking aloud here. Using a static function returning a response would perhaps make the code cleaner:
PHP Code:
if (true) {
return ControllerBreak::error('Check error');
}