Simon Davies Digital ltd

Simon Davies

Posts Categorized: PHP

Namespacing Models in Laravel

Posted by & filed under Laravel, PHP.

I have been using Laravel quite a bit recently and it’s a great framework, which is really good fun to code with. I’ve just started writing a registration system in Laravel and came across a problem which I felt was worth sharing. I was creating the table and model to store the event details and […]

PHP Insert into array at position

Posted by & filed under PHP.

The other day I found myself needing to insert into an array at a given position, so I wrote this little function. For example if you have pulled a list of posts from a database and are going to loop through these to output the HTML, but want to insert an advert after the third […]

Using composer with MAMP’s version of PHP

Posted by & filed under MAMP, PHP.

After my laptop has been running really for a couple of weeks now, I have decided to order some new RAM and do a clean install of Lion. This has given me a great¬†opportunity¬†to configure my development environment in a cleaner and more organised way. As a developer I do install a number of packages […]