Laravel 4 Base Controller for AngularJS

I’ve recently been doing a lot of work with Laravel 4 and AngularJS and it’s been a great experience so far. The resourceful controllers provided by Laravel integrate really nicely with the HTTP “services” available in AngularJS.

Laravel 4 has a ton of new stuff and among it all I’ve noticed how useful the Input::only() (Laravel Requests Class) function is inside of my controllers. It allows you to grab only a portion of the request data that reaches the controller and is a clean elegant way to pass data along for processing.

When I first started using AngularJS I quickly realized that all of the requests to my existing controllers were sending JSON payloads that were treated a little bit differently than the standard HTTP request data. After some digging around in the Illuminate\HTTP\Request class I found that it was rather trivial to enable the same helper methods for JSON request data.

Below is the code I used in my BaseController and then a sample of an “actual” controller where the parent constructor is invoked.

 

Nice, clean and simple; writing code with Laravel truly is a pleasure!

If you’re interested in trying out Laravel 4 I have a quick and easy vagrant setup available on GitHub.

Posted in AngularJS, Laravel, PHP | Leave a comment

CODAweb Redesign

I recently helped the College Orchestra Directors Association launch a new website. The Project was a huge facelift in conjunction with an information architecture overhaul.

The old site was developed with a table based layout and among it’s biggest problems, it lacked a cohesive and persistent navigation. Users were often confused and frustrated when trying to find information and navigate the site.

Read More »

Posted in Projects | Leave a comment

Google Web Font Compilation for Download

Google recently released their font API and font directory in an effort to bring more fonts to a wide range of modern browsers. This is great news for web designers and developers tired of using the same old fonts. There are other ways to serve non-web fonts in your sites, such as sIFR, Cufon, and TypeKit, but now Google is making it even more simple and, best of all, free.

The current selection of fonts is limited, but a welcome enhancement to the web designer’s usual choices. I particularly enjoy Molengo and Droid Sans. The only thing lacking from Google’s new system of web font deployment are the openly licensed fonts for download. If you are in the habit of designing pages in Photoshop and then developing them in your browser you will want to have these fonts on your system. So I took the time to download all of the fonts as they were served up by the Google font API (so that they are the exact version that is being sent to your potential viewers). I organized and gathered all the licenses for each font and packaged them together into this zip file.

So go ahead and make the web a more beautiful place!

Posted in CSS, Type | 3 Responses

Constant Headaches Cured with MailChimp

There’s no doubt about it, Constant Contact is a huge player in e-mail marketing.  They have been around since 1998 and are practically a genericized trademark for e-mail marketing campaigns.

Read More »

Posted in Article, CSS, E-Mail Marketing | Leave a comment

Apples to Peaches

I’ve been down in Atlanta for over a month and a half now.  The warm weather is really nice and being so close to my fiancée is a wonderful change.  I’m almost completely done with all the change-of-address paperwork, which I’m really excited about.

Read More »

Posted in Uncategorized | Tagged , , | Leave a comment

Quick and Powerful WordPress Themes

There’s no denying that WordPress is a great blogging solution; it’s free, easily extensible, and has great community support.  But creating your own themes from scratch can be time-consuming and repetitive.  There’s no need to re-invent the wheel, unless it can’t serve the desired purpose. Read More »

Posted in Article, CSS, Wordpress | Leave a comment

Developing on a Grid

Several months ago I came across the 960 grid system and became very intrigued.  The package of Cascading Style Sheet files promises to enable rapid development of websites while providing an easy-to-use grid structure.

Read More »

Posted in Article, CSS | 1 Response

Getting a Date with PHP & MySQL

Recently I was working on an event management project in PHP & MySQL which made me realize that there must be a good solution for interacting with dates and times;  a solution that doesn’t rely on PHP’s date format being stored as character data in MySQL, and doesn’t require the parsing out of MySQL’s DATETIME format in PHP.  Both PHP and MySQL have built-in functions for dealing with dates; it seems silly to have to give up one set of functionality for the other.

Read More »

Posted in Article, PHP | Leave a comment

The Best Buy

I work at a local Best Buy now.  It’s kind of funny because I started watching the TV show Chuck last year in college, and I loved it.  Who knew after graduation I might be working at the “Buy More” and being taught to loathe “Large Mart”.

Read More »

Posted in Best Buy | Leave a comment

The Next Chapter

I am officially done with my formal education.  It’s hard to believe I’ve spent the past 16 years behind a desk opening up my mind to be like a super absorbent sponge.   Read More »

Posted in Skidmore College | Leave a comment