So a while back I wrote an article about trying out a new pattern, “the repository and command pattern“.
Since using it in one of our major projects I have found it not all that great. So, yes it’s nice having it split from the Repo which I see as a way of searching on data, however, it’s a pain in the wotsit to test. Also, in Laravel it seems to add a lot of extra un-necessary time to my workflow.
The real problem however appears to be a mis-interpretation of what Commands are used for. Since Laravel 5.1 was released it has re-named Commands to Jobs. Highlighting that they should be used more so for delayed tasks rather than, inserting new models NOW!
So, it’ll take time to un-do I imagine and move them into the repository, however I’m glad I tried it as I’ve learnt a lot about testing!