vendredi 29 janvier 2016

Laravel 5.2: Is it possible to use where clause condition in eloquent object

Fetched the initial data by joining the other table

$results = Model::join('joining other table')->where('initial condition')->limit(100)->get();

Now, i need to filter the data by some additional condition.

$new = $results->where('column',value); // Additional Condition

I had tried this but it returns empty collection, even though persist in the $results collection. Is it possible to use the where condition in later part ?.



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

Aucun commentaire:

Enregistrer un commentaire