Showing 10 of 1,278 results.

Example Use | Laravel 5 Fluent API: The Public API

Retrieving values from a Fluent instance: 1 $ fluent = new Fluent ( $ testArray ) ; 2 3 // The first value 4 $ message = $ fluent -> get ( ' first ' ) ; 5 6 $ fluent = new Fluent ( $ testObject ) ; 7 8 // The first value 9 $ message = $ fluent ->...

Fluent and Closures | Laravel 5 Fluent API: The Public API

If we look at the following code example, one might be tempted to say that the value of $message would be Hello, world! , but that would be incorrect: 1 $ testObject = new stdClass ; 2 $ testObject -> method = function ( ) { 3 return ' Hello,...

Example Use | Laravel 5 Fluent API: The Public API

After the following code is executed: 1 $ fluent = new Fluent ( $ testObject ) ; 2 3 $ attributes = $ fluent -> getAttributes ( ) ; The $attributes variable would look have a value similar to the following: 1 array 2 'first' => string 'The first...

Example Use | Laravel 5 Fluent API: The Public API

The following method calls are equivalent: 1 $ testObject = new stdClass ; 2 $ testObject -> method = function ( ) { 3 return ' Hello, world! ' ; 4 } ; 5 6 $ fluent = new Fluent ( $ testObject ) ; 7 8 // Using the `getAttributes` method. 9 $...

Filter Search