Showing 10 of 2,138 results.

Laravel Collection Public API: has

has($key) The has method is used to determine if a item exists in the collection based on a given $key . The has method returns true if the item exists and false if it does not. The following example demonstrates the usage of the has method: 1...

Example Use | Laravel 5 String Helpers: Pluralization and Strings

…e pluralized, and the $count of the items. If the $count is equal to 1 , the original $value is returned. 1 use Illuminate \ Support \ Str ; 2 3 // cow 4 echo Str :: plural ( ' cow ' , 1 ) ; 5 6 // cows 7 echo Str :: plural ( ' cows ' ) ; 8 9 //...

Laravel Collection Public API: pop

pop The pop method is used to retrieve the last item from the collection while also removing it from the collection. If there are no items in the collection, the pop method will return null . The following sample demonstrates the use of the pop...

User and Visitor Data Privacy

…te administrators to collect less data about their visitors, and make it easier than ever to comply with local laws, customs, and be completely transparent with their users. Meerkat allows you to make visitor names and email addresses completely...

Laravel 5: Accessing Session Input Data With old

The old helper function is used to retrieve an old input item. It is a shortcut to calling the Illuminate\Http\Request::old instance method. It accepts a $key argument and a $default argument. They $key should be the name of the input item to...

Methods | Procedure vs. Function vs. Method vs. ?

Now we are on methods. And what an a mess we are about to get in. The term method falls out of object-oriented programming, of which we won't go into depth here. For now, an object is a collection of things that are related, or a program within a...

Laravel Collection Public API: put

put($key, $value) The put method is used to add a new item to the collection with a given $key and $value . The put method modifies the original Collection instance and returns a reference to it. The following code example will highlight the usage...

Filter Search