What are PHP Magic Methods?

If you have ever looked at the source code of open source PHP projects, you might have noticed object methods that begin with a double underscore. These are Magic Methods that allow you to react to certain events when using these particular objects. This means when certain things happen to your object, you can define […]

Continue reading...

Sending Email with Laravel 4

An extremely common requirement of modern web applications is the ability to send email. The need to send email ranges from resetting passwords to delivering receipts. In any case, sending email usually ends up being a pretty critical requirement in just about every type of web application these days. A couple of years ago, sending […]

Continue reading...

When should you use an Exception?

Exceptions are a wonderful aspect of programming languages because they allow you to notice when something has gone wrong and deal with it gracefully. Without exceptions your application would end up presenting errors to the user and it would be much more difficult to diagnose what went wrong if your code failed silently. Unfortunately exceptions […]

Continue reading...

Working with Configuration in Laravel 4

Configuration settings are something that you have to deal with in just about every type of web application. The majority of web applications will have at least a database, but its pretty common to have a number of third-party providers who you rely upon for different services. I think the problem of managing configuration data […]

Continue reading...

When should I code to an Interface?

The use of Interfaces in programming seems to be something that is often either confused or misinterpreted as being unnecessary. Whilst it is true that you aren’t required to use Interfaces in your code, an Interface provides a contract and ensures that the standard of development remains high. In this article I’m going to look […]

Continue reading...

Multi-Tenancy in Laravel 4

Multi-tenant applications are where you create a single application that is used independently by many different clients. When a client authenticates with your application, they are only able to access the data that they have created in your application and cannot see any data that was created by any of your other clients. A typical […]

Continue reading...

What are Abstract classes?

Abstract classes are a common feature of Object Orientated Programming languages such as PHP, Java or C#. I tend to think of Abstract Classes as a way to ensure a certain level of code quality because they enforce certain standards and can reduce the amount of duplicate code that you have to write. If you […]

Continue reading...

Exploring Laravel’s IoC container

Laravel 4 is a modern PHP framework that is built upon the good principles of high quality application design. This makes it easy to extend the core framework, swap out components for alternative implementations and trivially easy to create tests, mock dependancies and start using processes such as continuous deployment. A big part of the […]

Continue reading...

What is the Factory Method Design Pattern?

In software development there are many widely recognised, reusable solutions to commonly occurring problems. Being able to recognise these reusable solutions allows you be able to pick up new code much quicker because you will intuitively understand what the developer was trying to accomplish and how the code works. One of the most common reusable […]

Continue reading...

Eloquent tricks for better Repositories

One of the great things about writing code is, good practices are often obvious because it’s annoying to not follow them. For example, it’s annoying when you need to write the same thing over and over again. When you feel yourself getting annoyed by typing the same thing out multiple times, its time for an […]

Continue reading...

Supported by