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..



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1UiJAeT
via IFTTT

Aucun commentaire:

Enregistrer un commentaire