Showing 10 of 2,145 results.

Laravel Miscellaneous Helper Function: data_set

data_set(&$target, $key, $value, $overwrite = true) The data_set helper function can be used to set the value of an item in an array or an object property using dot notation. It accepts a reference to a $target array or object; the $key (array key...

I'm Getting The Wrong Data? | Laravel 4: Getting User Input

So we know how to get the input from the user, but how do we handle the occasional situation where we have ambiguous input? For example say we have a form field named name set to John Doe for a user's name using a POST request. In addition we also...

That Escalated Quickly: All the New Things

Hello, everyone! The last three-to-four months have been pretty busy on my end. After publishing my latest mega-series about a hybrid-cache system for Statamic , I started working on a new article series about writing a custom Statamic search...

Example Use | Laravel 5: Ensuring a Value is an Array With wrap

In the introduction of this section, we saw this example code: 1 function checkDomains ( $ domains ) { 2 if ( ! is_array ( $ domains ) ) { 3 $ domains = ( array ) $ domains ; 4 } 5 6 foreach ( $ domains as $ domain ) { 7 // Perform some operation...