Showing 10 of 1,280 results.

SORT_NATURAL | Laravel Collection Public API: sortBy

The SORT_NATURAL treats each item as a string while using a "natural ordering" algorithm to perform the sorting. The following code example shows how to use the SORT_NATURAL flag when sorting the $collection created previously (the callback...

Setting a Session Value | Laravel Helper Function: session

The session function allows setting session values directly by passing in an array of key/value pairs. The following example demonstrates this: 1 <?php 2 3 // Settings two session values 'test' and 'test'2 4 session ( [ 5 ' test ' => ' A test...

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...

Filter Search