jeudi 2 juin 2016

How to edit items in laravel collection

I am new in laravel, I run a query and get rows from database and I want to edit a column of this rows before get them in view. So here is my code piece :

$callPlans = CustomerCallPlan::whereNotNull('id');

foreach ($callPlans->get() as $callPlan) {
    dd($callPlan);
}

And the output screenshot:

enter image description here

I need to replace all the 'x' characters with '-' of numbertemplate column..



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire