Closed tenmajkl closed 1 year ago
This PR improves validaton in Request. From now on, Request::validate() won't return bool, but suspend your route callback with given value.
Meaning that instead of
$ok = $request->validate([ 'foo' => 'numeric', ]); if (!$ok) { return 'error'; }
you can do just
$request->validate([ 'foo' => 'numeric', ], 'error');
This PR improves validaton in Request. From now on, Request::validate() won't return bool, but suspend your route callback with given value.
Meaning that instead of
you can do just