Don't use abort / abort_if functions outside http layer
Ch4mpl00 opened this issue · comments
Here you call abort_if from a repository but it is not a repository responsibility to abort request.
Repository might throw an exceptions but not http related.
Also checking if user is allowed to do something is also not a repository responsibility.
You are right, I will move all "if statement" to the controller or any PHP class like service or job.