Iterating Backwards Through A Ruby Array

This will be a quick one. I have seen alot of posts on StackOverflow about iterating backwards through a Ruby array. Ruby, in all its beauty, gives quite a few ways to iterate through an array. Continue reading

Create an Admin Interface in Laravel

Nowadays, you’d be hard-pressed to find a PHP developer who doesn’t know about Laravel. If you are one of these people, visit the Laravel site ASAP! The framework is insanely popular in the PHP community these days because of the thought that has gone into it to make it easy to use and robust as hell! We will demonstrate its easy-of-use by building an admin interface that we can use to manage our users in some fake application we have already built. Continue reading

Querying by Custom Fields in WordPress

Sometimes, we want to query the WordPress database for all of a post type based on some custom fields we have set. WordPress makes it easy to do. However, the syntax can be kind of cryptic due to its usage of multidimensional arrays. Hopefully, I can help clear it up for you a bit. Continue reading

Using Magic Methods in PHP

When creating a class, it is necessary to not only think about the functionality of the class but also how a developer will interact with that class. Making a class API easy to use is well worth the effort. Luckily, PHP ships with quite a few magic methods that can make creating a class API much easier to do. In this article, I will be talking about three of them — __get, __set, and __toString. Continue reading

Using Entrust to Add Roles and Permissions to Laravel 4

Not long ago, I wrote a post about Adding Roles to Laravel Users. I like my custom solution, but I figured there had to be a better solution out there. Honestly, I should have done some looking for information before I built it. Anyways, I stumbled upon a package called Entrust written by Zizaco. Continue reading

Recompiling PHP on OS X 10.9 Mavericks

Yesterday, I updated my computer to the new release of the amazing OS X operating system from Apple, code-named Mavericks. Everything went smooth, but then I realized it wiped my PHP installation away and gave me the default Mavericks installation, PHP 5.4.17. Being a web developer, I like to have the most recent version of PHP whenever I can. So naturally I decided to recompile it. I have done this many times before after upgrades, so this wasn’t anything new to me. Continue reading