Showing 7 of 587 result(s)
The random method is fairly straightforward, the following example simply setups an input array and invokes the random method on it to return random items from the array. If we supply a value of 1 as the argument for the $number , parameter, the...
To change the status code of the response simply supply an argument for the $status parameter:
The request helper function is a useful helper function that can be used to either retrieve an instance of "Illuminate\Http\Request' or retrieve an item from the user's input. To retrieve an instance of Request , call the request method without...
The auth helper function is a convenience function to quickly access the Laravel authentication features; used without supplying any arguments for $guard , the auth helper function is an alternative to using the Auth facade. With no arguments, the...
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 dispatch_now function can be used to process a job within the current PHP process. This function will skip the job queue entirely and execute the job's task immediately.The signature of the dispatch_now function is:We will create a simple job...
The method_field helper function is a simple function that returns a new instance of "Illuminate\Support\HtmlString" The contents of the HtmlString instance is a hidden HTML input field with the name _method and the a value of $method .The...