Retrieve single column value from a table

Posted 1 year ago by Alderwiereld

I am presently having the following query

$user_id = Auth::user()->id; $picture = Profile::all()->where('user_id','=',$user_id)->pluck('profile'); return $picture;

what it achieves is the following output

["1000profilepic.jpeg"]

However i want it to return the value

1000profilepic.jpeg

because i want to make use of the same value inside the same controller

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

Reply to

Use Markdown with GitHub-flavored code blocks.