mercredi 31 octobre 2018

laravel update relationship data manually in controller before forwarding to view(blade)

I have changed data got from relationship of eloquent and now want to update relationship data with my custom data. Any idea how to do that? e.g.

$data = $model->perticularRelaion;
$data->operations; //to update data
now want to do something like this
$model->perticulaRelation = $data;

so when retrieve data in blade it show my updated relationship data.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2PA7Ge8
via IFTTT

Aucun commentaire:

Enregistrer un commentaire