mercredi 29 novembre 2017

How to use where with Laravel Eloquent Model

I am attempting to

 $orders = \App\Order::with(['Customer'])->where('customers.first', 'LIKE', "{$filterFirst}%");

However, I am getting

 Column not found: 1054 Unknown column 'customers.first' in 'where clause' (SQL: select * from `orders` where `customers`.`first` LIKE %)

How can I use where as well as with?



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

Aucun commentaire:

Enregistrer un commentaire