Query not working properly using the pluck() method

96 Views Asked by At

My query is not properly working; this query only gets data from one table. However, I should be able to take data from both tables. I'm using the pluck() method.

$this->projectcosts = ProjectCost::where('project_id', $id)
    ->get()->pluck('costItems')->toArray();
0

There are 0 best solutions below