Laravel Service Manager Indirection
Consider the Laravel caching facade. Laravel lets you store and retrieve values to/from the cache with the following syntax
astormConsider the Laravel caching facade. Laravel lets you store and retrieve values to/from the cache with the following syntax
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
astormSubtitle: PHP Has Mysterious Ways. This week it's another quick primer on PHP's lesser known "magic" features in preparation of moving on to Laravel Facades.
astormLast time we discussed instantiating objects in Laravel using the make method. Today we're going to talk about services, service containers, and binding objects into service containers.
astormThis week's a quick remedial primer on PHP's ArrayAccess interface. We'll be back to Laravel next time, and promise you'll see why we needed the primer.
astormLaravel is already a well documented system. The quick-start guide guide has all the information a developer needs to start building applications with Laravel. What's less well documented, and more interesting to me, is documentation of Laravel's implementation. The PHP community has a pretty
astormLaravel's error handling is one of its most noticeable developer facing features. Like many modern PHP frameworks, Laravel ships with its error reporting set to E_ALL, and strives for Notice free PHP code. Additionally, Laravel includes the Whoops framework, which creates readable stack traces
astormIf you're a long time reader, you're probably aware of my article on Magento's many 404 pages. It's been one of the more useful articles I've written here — I own the Google results for the phrase "Which 404 page" in Magento land.
astormConfiguration Gaslighting Checklist A quick Stack Overflow answer from yours truly that covers what to do when you think Magento’s gaslighting you on configuration values you’re sure you’ve changed.
astormI needed to grab a few category names when all I had were the category IDs $categories = Mage::getModel('catalog/category')->getCollection() ->addAttributeToSelect('name') ->addFieldToFilter('category_id', array('in'=>$product['category_ids'])); Can you spot the error? PHP complained with the following error Fatal error: Call [...]
astormIn a stock Magento system, there’s several tables where a row will have an ID field of 0. mysql> select * from core_storeG: *************************** 1. row *************************** store_id: 0 code: admin website_id: 0 group_id: 0 name: Admin sort_order: 0 is_active: 1 *************************** 2. row [...]
astormIf you’re new to Magento, you may not realize that every remote API method has a native PHP equivalent. The why, how, and how to identify these models is covered elsewhere, but one thing I forget at my peril is how useful the API methods are when I need to serialize something as JSON or via PHP’s serialize function. [...]
astormCan’t Log into the Admin Roundup Stack Exchange answer where I (attempt to?) list every possible reason the Magento Admin might not set a session cookie, creating the dreaded “can’t log into the admin” error.
astormAnti-SQL Bias Developers coming into Magento are often put off by seemingly voodoo rituals like “Don’t directly manipulate the database tables with SQL”. This may be a ritual, but it’s a smart one, and my answer to this questions tells you why. It also includes an example SQL query for fetching all the product [...]
astormI can’t login to Magento Admin Another misconfiguration that can make it impossible for developers to log into the Magento admin.
astormtim-reynolds/magento-qconfig When I started using Magento the System Configuration section made me feel a little dumb — so many options, but no easy way to search for things. I’d always forget where a particular option was. After a few months of using grep and ack to search though the system.xml files and work backwards to figure [...]
astormMagento system.xml hint tag. Some background on an abandoned “hint” tag for Magento’s system configuration form fields.
astorm