Showing 7 of 1,697 result(s)
…erting a Multi-Dimensional Collection Into a Single Dimension With collapse, Laravel 5 Collections: Determining If a Collection Contains an Element With contains, Laravel 5 Collections: Determining if a Collection Contains an Element Using Strict...
While there are many Blade directive "pairs," such as the conditions, stacks, and related, Blade is inherently a structureless templating language. However, the Blade Parser library can make sense of structures within a Blade template to help tool...
…access the application. Using environments, our Laravel 4 application can automatically change to a different database server or use a different cache driver. However, when we are writing our own code and would like to check the environment name...
Now we need to add that conditional check we talked about earlier: And then finally we return the current page's URL: That's the changes we need to make to the getUrl($page) function. There are still some things we need to do to make it useful....
…n array. The following example would retrieve the first three items from an articles collection and seperate the first article out from the remaining two, allowing us to generate different HTML for them: Note : We are utilizing the as collection...
…mework example from earlier: While it might look complicated, we are simply iterating each of the error messages returned by the server and looking for any inputs that match in our reply form. If we find a message, we add the has-error class to...
every($step, $offset = 0) The every method can be used to retrieve a subset of a collection based on each items distance from each other. It defines one required parameter $step and one optional parameter $offset . An argument supplied for $step...