I have this line:
$user = DB::table("users")
->where("email", $email)
->where("password", $password)
->first();
This selects all columns. Is there a way to discard or pick which columns to fetch or do I have to add each column I want to respond with manually? Like Request only() and except() methods.
Manual way:
response()->json([
"name" => $user->name,
...
])