I have tried doing this
$query = "SELECT * FROM policies";
$policies = DB::select($query);
And also this
$policies = Policy::all();
Whenever I try to do this, this happens
here is my controller function
public function getPremiumCollectionReport (Request $request) {
$policies = Policy::all();
echo $policies;
}
Other queries run perfectly well for other models and tables. And if I run the raw query in the sql server, it runs perfectly as well. Can anyone help me find a solution? I don't have a clue.