Showing 10 of 2,138 results.

Customizing the Main Navigation Menu | Navigation Menus

The main structure of the "Docs" navigation menu comes from the currently active version's structured collection. The relative hierarchy within this collection will be preserved when rendering the menu. To render the current version's menu within...

Laravel 4: Getting User Input

No matter what application you're developing, or what platform you are developing on, it is a safe bet you need to get input from your users some how. Laravel 4 provides a really convenient way to do this using the Input facade. Let's look at a...

Laravel 5 Macros: Creating Class Based Macros with Mixins

In version 5.4, Laravel added the concept of "macro mixins": a way to define and group related macro methods and utility functions into a class and then inject, or mix in all of the class methods as macro methods to any class that utilizes the...

Laravel Collection Public API: flip

flip The flip method will return a new Collection instance where are the all the collection item's keys have been exchanged with their corresponding values. The following code example demonstrates the effects of the flip method: 1 <?php 2 3 use...

Laravel URL Helper Function: elixir

elixir($file, $buildDirectory = 'build') The elixir helper function can be used to get the path to a versioned Elixir file. The function accepts two arguments, the name of the $file to find the path for and the $buildDirectory to look in. By...

Laravel 5: Throwing HTTP Exceptions With abort

The abort function will throw an instance of Symfony\Component\HttpKernel\Exception\HttpException with the given $code , $message and any $headers supplied. These exceptions can be caught and handled through the application's kernel. If the $code...

Laravel Collection Public API: values

values The values method can be used to retrieve a new Collection instance containing only the values of the original collection instance. The keys of the new collection will be reset to consecutive numerical keys. The following example...

Laravel Collection Public API: merge

merge($items) The merge methods merges the given $items with the items in the collection. The merge method will replace any item in the original collection's items if a string key with the same value exists in the supplied $items . If the $items...