samedi 23 juin 2018

Where to put data validation in ADR pattren?

Where to put data validations in Action–domain–responder architectural pattern? What I am trying to do for now is something like this:

|- app/  
   |- Console/  
      |- Commands/  
   |- Events/  
   |- Exceptions/  
   |- Http/  
      |- Middleware/  
   |Blog
      |- Actions/  \\Sned data to a Service then recive data to be handled by a Responder
      |- Domain/  
          |- Models/  
          |- Services/  
      |- Responders/   
   |- Jobs/  
   |- Listeners/  
   |- Providers/  
|- database/  
   |- factories/  
   |- migrations/  
   |- seeders  
|- config/  
|- routes/  
|- resources/  
   |- assets/  
   |- lang/  
   |- views/

For validation I want to use FormRequest to handle that. Should I put it inside Actions?

Aucun commentaire:

Enregistrer un commentaire