samedi 30 avril 2016

How to append to result in Laravel 5.1

I try to return my search result into array to show in blade but get error :

$persons = persons::where('name','like',"%$search_term%")->lists('id');

foreach($persons as $person)
{
       $trials = trial::with('samples')->with('persons')->where('persons_id', '=', $person)->get();
}

FatalErrorException in 0bfe77047992e2dce86ae561e266494c line 37: Call to undefined method Illuminate\Database\Eloquent\Collection::appends()

I try to this with + array, but get errors



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire