If you haven’t heard of Leo Babauta before, you definitely need to check out his website Zen Habits: Zen Habits is about finding simplicity in the daily chaos of our lives. It’s about clearing the clutter so we can focus on what’s important, create something amazing, find happiness. As a way to be more active […]
Laravel is a fantastic PHP Framework that does most of the complex, and boring, application framework tasks for you, so you can focus on the application itself. One of the components it provides is a full Queue Worker system to make it very easy to add jobs into a queue and process them in the […]
For a project I’ve been working on, I needed to accept a time value input from users (for a timesheet). So I figured, what the hell, I’ll use the new HTML5 time input field (<input type=’time’ …>). It seemed to work perfectly when testing on my laptop with Chrome – a nice and simple time […]
Eloquent, which is Laravel’s ORM, has some really nice features. One of which is the [Eager Loading][eager]functionality that allows you to request all of the related records in one hit, to avoid having to makemultiple database calls for each iteration of a loop. Let’s look at a simple example which returns the latest 10 blog […]
This post was updated on 2014-01-22. The Proposal that I mentioned in the original articlewas approved and then implemented by Taylor Otwell, and has since been released in Laravel 4.1.
Since I’m a PHP developer and I run Ubuntu on my laptop, I find it very easy to development directly on the machine. This means that my laptop also has PHP and MySQL running (and until the new PHP 5.4 dev server, Apache). While PHP doesn’t is only used on-demand, the MySQL server is a […]
If you use an automated testing platform (such as Jenkins) you may have come across the problem where you need to manually create a new database (and sometimes user) every time you configure a different build or a different host. For small projects it’s not much of a chore, but for larger projects (or complicated […]
I’ve just spent the last hour trying to get IP forwarding to work with UFW nicely on Ubuntu. So in the interests of the common good, and so I can find it next time, I’m posting the answer here.
There is a very quick and simple way to sort an array with version number keys in PHP.
There is an interesting it-makes-sense-when-you-think-about-it issue with Encrypted Home directories and SSH key authentication I’ve recently discovered in Ubuntu (it will affect any distro though). Since Encrypted home directories aren’t decrypted until the login is successful, and your SSH keys are stored in your home directory, the first SSH connection you make will require a […]