A
A
Abc Edc2016-01-27 11:00:26
Laravel
Abc Edc, 2016-01-27 11:00:26

Who is responsible for formatting the repositories in laravel?

Previously, I created records directly in the database. Now the task is not to rewrite the front, to switch to data transfer to api. That is, puff simply receives data from the submit and makes a record by knocking on the rest. I decided to use a repository or just some manager for this (so that the controllers do not change and use the same create). So the problem is that if the formatting of data for writing was handled by mutators before, then who is now responsible for this business?
you can of course continue through them

$entity_ = new Entity($params);
 $entity_ = $company_->getAttributes();

But somehow it turns out to be stupid to call in order to pick it up right away, or not?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question