function Global / throw_unless
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

throw_unless

throw_unless ( ) : mixed

Throw the given exception unless the given condition is true.

Parameters

  • $condition mixed
  • $exception TException|class-string<\TException>|string
  • $parameters mixed