I tried to get data from db having the particular id . The code is as follows :
$obj = new Products();
$res= $obj->select('*')->where('track_id',$trackId)->orderBy('shipping_date', 'desc')->get();
But I am getting error as 'Failed to load Response Data'.
I have no idea why this error occurs. Someone please help me.
If you're using eloquent model, you can directly use class name to fetch records in following manner.
Reference: Retrieving Model