Understand and Implement Laravel Model Events

One of the most powerful functionalities in Laravel is the event. This feature enables all the triggers of various tangentially related functionality to occur throughout the life cycle of a model instance. Plus, events are always listening – meaning you don’t have to explicitly call them in the code to harness their powers. In this post, we’ll implement a sample Laravel model event listener.

Extracting Eloquent Queries to View Composers in Laravel

Whenever working with data using Laravel, it can be easy to write a few small Eloquent queries within your blade files to access the database. However, this practice can quickly spiral out of control if you're not careful, increasing query load time and destroying the performance of your application. In this post, I'll explain how to extract commonly used queries to a view composer so that they can be shared across multiple views that use different blade files.

Getting Started with HAML on Rails

The HAML syntax is like installing all the software updates on your computer: at first it seems like upgrading is going to take forever and it's not worth it, but once you're up to date the time saved pays for itself and you could never imagine going back to your old ways. You can also learn a ton from the official HAML reference, but consider this a cheatsheet to bootstrap your proficiency and get started with some of the major use cases. 

RubyGem acts_as_votable Tutorial

Reddit. Quora. ProductHunt. What do all of these websites have in common? Besides their rabid fan bases, they enable a community to interact with content via simple voting buttons that users can click on to promote or demote content. Luckily for Ruby developers, there's an awesome gem I came across this week that quickly builds the same functionality. Here's a tutorial on how to get started with acts_as_votable

Javascript: Make Elements Appear On Scrolling

If you've used the internet recently, you've probably noticed a design trend popular on app landing pages, personal websites, and all kinds of other websites: elements that are animated to appear on the page when you scroll to that point. Although it appears fancy, this effect is ridiculously easy if you utilize a little bit of javascript and two external frameworks. Let's walk through creating a simple animated webpage from scratch.