I just started converting mysql to nosql (Mongodb) and after convertion it's showing some error like this:
Trying to get property 'size' of non-object
This is the code below i used
class PanelController extends Controller
{
public function index()
{
$userid = Auth::user()->id;
$users = DB::collection('Booking')->where('Uid', '>=', $userid)->get();
return view('panel.main')->with('records',$users);
}
}
In the view i'm using like this,
@foreach ($records as $rec)
@endforeach
So please someone can help me with this would be much appreciated.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire