Showing 7 of 1,216 result(s)
All three functions ( abort , abort_if and abort_unless ) can cause the execution of an application to stop. Each of them can cause the exact same end result, but the abort_if and abort_unless functions allow for the writing of code that reads...
The throw_if function can be used to throw an exception if the supplied $boolean value evaluates to true . The supplied $parameters will be passed along to the exception's constructor.The signature of the throw_if function is:In the following...
The throw_unless helper function is the logical counterpart to the throw_if helper function. If the provided $boolean value evaluates to false , a new instance of the provided exception will be created and thrown. Any parameters specified will be...
The abort_if helper function performs the same basic function as the abort helper function. The only difference is that the abort_if defines one extra parameter: $boolean ; if the argument supplied for $boolean evaluates to true , the abort_if...
The abort_unless helper is the logical opposite of the abort_if helper function. Like abort and abort_if , the abort_unless helper function has the potential to abort the executed of the running application; if the argument supplied for $boolean...
The factory function is used to create Eloquent models, and is generally used when testing an application to generate sample data.The signature of the factory function is:The factory method can generally take one of four forms:
The decrypt helper function can be used to decrypt the provided value. The function resolves the configured "Illuminate\Contracts\Encryption\Encrypter" implementation from the Service Container and then calls the decrypt method on the Encrypter...