samedi 9 mars 2019

Problem in building relationships query in Laravel

Suppose we have 3 tables , User , Report and Job, in user table we having 2 columns to use , id and job_id, in report table , we have user_id and job_id' ... So I need all users with report detail, whose job_id and user_id matched User table... I want to do it with relationship.. I made that query... Problem is how to write multiple where clause with report,(where user_id,job_id).

User:: select (*)->with(["report")-paginate(10);



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire