Here we go again with Digging Code, fully implementing the Repository Design Pattern. This enhances the code's cleanliness, eliminates redundancy, and speeds up the Blog's load time.⚡
Let me walk you through the steps I followed:
I created a BaseDashboard class to hold the duplicated queries used in all repositories making other repositories simpler, as they only need to define the model in the constructor. 🤯
Based on the previous step, in the ArticleController, I can specify the SELECT statement's columns, and load the relationships. 😎
Following this pattern, the Blog controllers become simpler. 🚦
Top comments (0)