Laravel Logo

Laravel 4 – Pivot vs Polymorphic – Part 1

PHP has come a long way! Coming from the Rails world back to PHP has actually been pretty painless thanks to Laravel. One of the first things that stumped me was under what circumstances to use pivot vs polymorphic relationships. This post is more of a reminder for myself but I hope it clarifies things […]

Continue Reading 1

Creating the bouncy/zoom image effect in the KickStarter iOS app

The KickStarter iOS app is pretty awesome. In particular, I like the bounce/zoom effect they have when you pull down on a UITableView. Turns out, it’s pretty easy to replicate. Since UITableView inherits from UIScrollView, we can simply implement the scrollViewDidScroll delegate method and detect when a scroll happens. From there, we just scale the […]

Continue Reading 2

Lighttpd – url rewrite and query string QSA

One of the first things I was curious about when I started using Lighttpd was url-rewrites. On apache mod_rewrites you can use the [QSA] flag to allow for the query string after your new urls. Here is the equivalent in lighttpd. This would go in your lighttpd.conf file which is usually located in /etc/lighttpd/lighttpd.conf on […]

Continue Reading 0

PHP: Handle comma separated input

A quick example of how to handle comma separated input from a POST variable in PHP. The code below will turn your POST variable into an array containing the user’s input which you can further validate or store in a database. This is useful for letting users add tags to items on your website.

Continue Reading 1

Powered by WordPress. Designed by Woo Themes