Use middleware can be fired before the request (and you can post code before that request).
Aug 12, 2015
3
Level 1
Middleware or Validation on deleting?
Hi guys!
I have a question regarding when to use middleware or validation?
In my case I want to validate if a given user is allowed to DELETE a post. As far as I know, I could either setup a middleware on that specific DELETE-route or utilize the authorize()-function within a validation request class.
What is the right thing to do in my case?
Please or to participate in this conversation.