php
Session User Controller Injection In Laravel
September 12th, 2014
An easy way to inject the authenticated user, Auth::user(), into any object using the IoC container in Laravel.
Auto Dependency Resolution for IOC
September 11th, 2014
Ever wondered how Laravel determines which objects to pass into your classes. This guide explains how automatic dependency resolution works by showing you how to make a basic IoC container. This relies heavily on php reflection api.
Horizontal Code Reuse Through Traits
February 22nd, 2014
Traits were added to php in version 5.4 as a way to introduce horizontal code reuse. They end up being a way to programmatically copy and paste methods into objects. Traits act as php's version of multiple inheritance.
Cleaning up your templates with array_chunk
January 23rd, 2014
array_chunk is a native php method you've probably never used before, but it probably could have saved you time on lots of occasions. Here we'll dive into a use case for array_chunk, other than batch requests to services, that will help you write cleaner code.
Redirecting http to https using Symfony 2 Routes
August 1st, 2013
A quick how to guide on redirecting all http routes to https using symfony's routes component.
Searching Disparate Datastores
August 31st, 2012
Some quick links from a lightning talk I gave at sfphp's open mic night.
Opening VIM From Inside PHP
September 1st, 2010
Want to prompt the user for a large amount of text for your CLI application? Using some flag and a large string on the command line is not always ideal. Fear not, it's easy to open a text editor from inside your application.
- «
- »