Laravel’s MacroableTrait
Another quick primer this week, but this time it's Laravel specific.
astormAnother quick primer this week, but this time it's Laravel specific.
astormIt's another quick primer this time. Today we're going to talk about a PHP 5.4+ feature called traits. While Laravel doesn't make heavy use of traits they are sprinkled around the core codebase, so you'll want to get familiar with them.
astormLast time we described the PHP patterns used to implement Laravel's facade feature, and started to describe some of the "gotchas" involved. We briefly discussed how a facade introduces a second type of singleton/shared service into the system, as well as the inherent problem
astormSo far in this series, whenever we've wanted to use a service, we've fetched Laravel's application/service-container object with the global app function
astorm