jeudi 4 mai 2017

How to use where by second table Laravel?

I have the following query:

$objects = Object::with("prototypes");

As you can see I do request to model Object and join it with prototypes.

The prototypes table has structure:

prototype_id
name

How to make where in above query like as:

$objects = Object::with("prototypes")->where("prototype_id", 3);



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

Aucun commentaire:

Enregistrer un commentaire