phil1992
9 months ago
53
13
Laravel

does anybody know the right syntax here ? ;)

Posted 9 months ago by phil1992

Code: public function index() { $id=Auth::id(); $posts=post::orderBy('created_at','desc')->where('nutzer_id','==',$id)->paginate(8); //$posts=post::orderBy('created_at','desc')->take(1)->get(); return view('posts/meinedaten')->with('posts',$posts); }

error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'nutzer_id' in 'where clause' (SQL: select count(*) as aggregate from posts where nutzer_id = ==)"

Please sign in or create an account to participate in this conversation.