Blog

Simplify Validation Messaging with Blade Directives

I am a big fan of templating tools, and Laravel's Blade templating system in particular. Given that PHP itself was originally conceived as a templating language you might think that using an additional layer of templating on top of PHP is a bit ironic, but I do think there is a real benefit. We...

Better 404 Logging in Laravel

Out of the box, Laravel provides an excellent methodology for handling exceptions that occur in your applications. However, I sometimes find that the default handling of 404 errors is not very helpful for resolving problematic URLs. It turns out this is very easy to implement with a few minor tw...

Using Mockery with Codeception and Laravel 4

I have a new client who came to me wanting to build out some new features on an existing Laravel 4.2 application. Unfortunately the codebase did not have any tests, wich complicates the process of implementing the new changes. As a sort of stop-gap measure, we have agreed to add some "retro-active...

Using Lumen and Mandrill to Process Incoming Mail

One of my clients has a WordPress site which makes use of several different contact forms. Powered by the Contact Form 7 plugin, they send their data to an email address when the user submits the form. Recently my client decided that they wanted to send a "Thank you" email as a response to each...

Laravel 5 Package Development: Setup

As of this writing, Laravel 5 is very close to having an alpha release. Consequently many developers are now scrambling to get their Laravel 4 pacakges working with Laravel 5. This is the start of a series of posts about my experience making that upgrade for one of my packages.

One major dif...

Laravel 5 Package Development: The Service Provider

Lets now look at upgrading our pacakge service provider to work with Laravel 5. The service provider is intended to inform the application of the package's existance and register its assets. Exactly how this is done will vary depending on the needs of the pacakge, but there are several common item...

Single Table Inheritance

In a nutshell, Single Table Inheritance is the practice of using one database table to track multiple types of resources. When designing web applications, more often than not you will use one database table for each type of resource you are managing: One table for users, one table for posts, one fo...

Running Homestead 2.0 on Windows

I know we have just met, but I have a confession to make. I am a windows user. Sure, I have dabled with linux distros in the past, and I have some very good friends who are tried and true Mac enthusiasts, but at the end of the day I have always felt most comfortable using Windows as my primary ope...

Translating Custom Error Messages in Laravel Packages

Let's say that you are writing a Laravel package that involves data validation with custom error messages. Let's also say that you are interested in allowing your package to be translated into other languages. How would you pass your custom error strings to your validator?

I ran into this issue...

So you Want a Website

For the uninitiated, the idea of getting a website can be an alluring one. I have had many potential clients reach out to me and with some variation of the following:

My project is so awesome. It should have a website! Can you make it for me?

Too often that is the end of the statement. No...