oziel
268
5
General

get data from database error.

Posted 4 months ago by oziel
$user_id = Auth()->user()->id;
        $user = User::find($user_id);
        return view('Dashboard')->with('posts',$user->posts);

i have the following errors

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.user_id' in 'where clause' (SQL: select * from users where users.user_id = 1 and users.user_id is not null)

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