I wonder how I can use eloquent orm to only select specific columns.
Eg my query:
$user = User::where('u_id', '=', $userid)
->where('type', '=', 1)
->where('is_active', '=', 1)
-> "only select firstname and lastname"
Please sign in or create an account to participate in this conversation.
Use Markdown with
GitHub-flavored code blocks.
There's no shortage of content at Laracasts. In fact, you could watch nonstop
for days upon days, and still not see everything!