What is it about?
Saving the data in database directly from the controller is violating the Single responsibility Principle. My Laravel Framework Version is 5.2.6
What is tried so far ?
I was watching this Video and got to know that I should create command using below syntax. This was because I think due to the reason that we should transfer the object from Controller to Command Class.
php artisan make:command CreateProduct
Here is the Video URL
What's the Problem ?
make:command is not part of this Framework.
What's the Question ?
As we have models that can be used to create the new record is database. How can I follow Single responsibility Principle in Laravel Framework 5.2.6 ?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire