Showing 10 of 2,055 results.

Laravel Collection Public API: jsonSerialize

jsonSerialize The jsonSeralize method internally returns the value of the toArray method. This method exists to implement PHP's JsonSerializable interface, which allows developers to customize how a class is represented when using the json_encode...

Laravel Collection Public API: toArray

toArray The toArray method is similar to the all method in that it will return the underlying array that the collection instance is using. The difference, however, is that the toArray method will convert any object instance it can into arrays...

output | The Laravel Framework Console Kernel

The output method is used to retrieve the generated output from the Artisan console command that was executed last using the call method. The following example will assume that the inspire command has been registered. First we need to call the...

An Introduction to Laravel View Error Bags

…st contains any errors. This functionality is facilitated by the Illuminate\View\Middleware\ShareErrorsFromSession middleware. The ViewErrorBag instance that is shared with views is given the name errors . Interacting with the ViewErrorBag...