Open sidebar
// When I fetch all records from a table specifying a foreign key I get results returned return $this->slide->where('foreign_key', '=', $foreign_key) ->get() ->all(); // But when I try fetch a specific model using the id and foreign key I get an empty array return $this->slide->where('id', '=', $id) ->where('foreign_key', '=', $foreign_key) ->get(); // This is what's returned when I do a dd() of the query result object(Illuminate\Database\Eloquent\Collection)#505 (1) { ["items":protected]=> array(0) { } }
Close sidebar
Back
Please note that all pasted data is publicly available.
Twitter
GitHub
Use setting
Back
Please note that all pasted data is publicly available.
Twitter
GitHub
Use setting