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 […]
There is a very quick and simple way to sort an array with version number keys in PHP.
When I was setting up a new Zend Framework application today I encountered an interesting message: [email protected]:~/workspace/application$ zf create project ./ applicationCreating project at /home/valorin/workspace/applicationNote: This command created a web project, for more information setting up your VHOST, please see docs/READMETesting Note: PHPUnit was not found in your include_path, therefore no testing actions will be […]
I came across an interesting issue at work today. We have a PHP script which monitors a socket on our phone system to save call logs into a database. It’s pretty simple, but it needs to run constantly to catch all the phone calls going through the system. So I did some goggling and found […]
I wrote this article for my work’s public blog – go there and post comments so I look cool 🙂