throw_if
before
if ($boolean) {
throw new CustomException();
}
after
throw_if ($boolean, CustomException::class);
abort_if
before
if ($boolean) {
abort(403);
}
after
abort_if ($boolean, 403);
@continue
@foreach ($results as $result)
@if ($result->type === 1)
@continue
@endif
...
@endforeach
after
@foreach ($results as $result)
@continue ($result->type === 1)
...
@endforeach
@break
@foreach ($results as $result)
@if ($result->status === 1)
@break
@endif
...
@endforeach
after
@foreach ($results as $result)
@break ($result->status === 1)
...
@endforeach
includeWhen
if ($boolean) {
include('view.name')
}
after
includeWhen($boolean, 'view.name');