For a long time, I followed the approach of creating controllers and repositories for individual entities (models). While this approach works, it slowly started to leave a bad taste in my mouth. After much researching into alternative approaches I was unable to find something that truly fit what I wanted. So I decided to have a go at creating my own.
Multitenancy with Laravel is a course and package offering that I've been working on for some time. It covers everything you need to do to get started with multitenancy and Laravel.
My one-man quest to stop people over-engineering their code continues, but this time I'll be approaching roles & permissions, commonly referred to as an RBAC.
In this article, I'm going to go through some of the reasons I stopped using Eloquent, as well as covering the reason for Articulates creation, and the different iterations that I took to make it what it is today.
Multi-tenancy seems to be a hot topic at the moment, with many hoping that Laravel Nova was going to solve all of their issues. There are a lot of packages out there that aid you with your multi-tenanted endeavour, but it doesn't have to be that complicated. Honestly.
Lately I've found myself getting frustrated with Eloquent, needing more than Laravels default ORM offers. I'm a big fan of the DataMapper pattern, but I become disheartened with the overhead and complexity of Doctrine. My time spent with Java has brought out a love for objects, and absolutely everything being objects. With this in mind, I created myself a super basic lightweight ORM named Articulate.
The repository pattern is one that appears to polarize developers, with half swearing by and half swearing against. It's also something that seems to have been spoken about a lot, though I feel that more often than not, it's an over complicated over engineered approach.
It has been while (almost two years) since I wrote an article here and I've decided to make my triumphant return with an article I never managed to get around to writing. As the title may suggest, this article is about streamlining validation with Laravel. While the final aim is to explain and present you with a quick and simple abstracted validator that requires minimal code in the actual implementation stage, before we get there I will need to cover the usual methods of validation which are default validation, form request validation and model validation. So let's start.