samedi 18 janvier 2020

How i Getting records from two tables in laravel or how i can match the date with second table

Hello please i am trying to do something using laravel. I am trying to get records from a table that is already linked to another table

Table name 1 : ProductStock Table name 2: Sales is linked to table name two using user_id colum.

i want to get records from product stock table and sales where the following

->whereBetween('created_at', array($thirdweekdata, $fourthweekdata))



          //I have tried this but it only get from ProductStock table..but i want this 
         wherebetween to be from sales table

         $fourth =  ProductStock::where('status',1)
          ->whereBetween('created_at', array($thirdweekdata, $fourthweekdata))
         ->get();


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

Aucun commentaire:

Enregistrer un commentaire