Level 10
With eloquent model:
User::find($id)
Or make query:
$user = DB::table('users')->where('id', $id)->first();
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Sorry for my english..i am new to laravel.. Actually am trying to get data from a table also the user data... In the table am stored the user id along with the data... Now i need to get the data and also the User data... Can anyone please help me...
Please or to participate in this conversation.