Showing 10 of 1,280 results.

Laravel Artisan Tinker: The whereami Command

The whereami command can be used to approximate where you are currently executing code within your code base. Starting a fresh Tinker REPL session and issuing the whereami command produces these results: 1 >>> whereami 2 31| $kernel =...

Laravel Helper Function: csrf_field

csrf_field() The csrf_field function can be used to generate a hidden HTML element containing the value of the CSRF token. For example, the following HTML code can be greatly simplified using the function: 1 <! DOCTYPE html > 2 < html > 3 < head >...

Laravel Translation Helper: trans_choice

The trans_choice helper function is used to pluralize a given $id , translating it for the given $locale . The choice method accepts the $number of some collection of objects that it should use when making pluralization decisions. Like the trans...

Laravel Collection Public API: unique

unique($key = null) The unique method can be used to get all the unique items in the collection. It accepts an option $key which can be used to further restrict which items are returned. The unique method returns a new instance of Collection with...