Array – Dot Notation
Published on by Eric L. Barnes
Chris Pitt shows you how to setup your own dot notation for arrays by using Laravel as an example.
I like these and his example is a good one:
$config["app"]["cache"]["provider"] = "redis"; // Typical way:if (!empty($config["app"]["cache"]["provider"])) {} // compared to:$config->get("app.cache.provider", $default);
Eric is the creator of Laravel News and has been covering Laravel since 2012.