Dependency Inversion and Interface Segregation using Laravel’s Service Container

In very short, we’re going to cover the Interface Segregation Principle (ISP) and the Dependency Inversion Principle (DIP) in this article, and practically how we implement them within a Laravel environment. Dependency Inversion Principle The principle is handy for the decoupling modules (making them independent of one another) Modules should not depend upon each other, …

Simple open source package for Laravel RESTful APIs

Hi everyone In my last post about creating simple search and filtering for Laravel I said I was considering creating a package to encapsulate this functionality. Well, I got this done a few weeks ago and have now released it onto Composer (Packagist) as kya/laravel-rest You can find the repository on GitHub here, and the …

Quick Life Hacks with the Eloquent Model

Hi folks, It’s no secret that I love Laravel, and especially love Eloquent. This post isn’t about why various people don’t like Eloquent, etc, etc. but just some “life hacks” of working with Eloquent. #1 – Naming Conventions I personally like to use the following naming convention on my databases (using a forum as an …