Closed rmrhz closed 8 years ago
Rewrite the setEntity function to accomodate certain functionalities that will improve usability cases
setEntity
Improvements
$this->entity
\Prjkt\Component\Repofuck\Repofuck
entity()
$entity
Possible Future Use Cases
$keys = ['foo', 'bar']; $foo->update($request->all(), $keys, function($repo) { // assuming that from the request `bar` is an array $bar = $repo->setEntity('bar')->create($repo->data['bar'], array_keys($repo->data['bar'])); $repo->pluckKeys(['bar'])->pushKeys(['bar_id'])->pushData(['bar_id' => $bar->id]); });
Rewrite the
setEntity
function to accomodate certain functionalities that will improve usability casesImprovements
$this->entity
\Prjkt\Component\Repofuck\Repofuck
entity()
function instead of providing an object from the$entity
parameterPossible Future Use Cases