Showing 10 of 2,145 results.

Retrieving a Session Value | Laravel Helper Function: session

Values can be retrieved with the session function by supplying a $key . To retrieve the test value from the earlier example the function call would look like so: 1 <?php 2 3 // Retrieving the 'test' value. 4 $ value = session ( ' test ' ) ; It is...

Example Use | Laravel 5 Fluent API: The Public API

The following code: 1 $ testObject = new stdClass ; 2 $ testObject -> method = function ( ) { 3 return ' Hello, world! ' ; 4 } ; 5 6 $ fluent = new Fluent ( $ testObject ) ; 7 8 $ jsonValue = $ fluent -> toJson ( ) ; would be converted into the...

Laravel MessageBag Public API: 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 (namely any...

Laravel Artisan General Command: The serve Command

The serve command is used to run the application using the PHP development server. This command is generally used for development and testing purposes. The serve command accepts two optional options: host can be used to change the address of the...

setThrowExceptionOnUnknownComponentClass | Blade Compiler

Sets whether the compiler will fail when it encounters unknown component classes. Argument Description $doThrow Whether to throw on unknown component classes. 1 <?php 2 3 public function setThrowExceptionOnUnknownComponentClass ( 4 bool $ doThrow...