I have a following problem, I made a API
and it returns me a array
:
"id": 1,
"email": "[email protected]",
"senha": "lucas123",
"created_at": "2018-02-15 16:48:12",
"updated_at": "2018-02-15 16:48:12"'
I would like to only return 3 fields id
, email
and senha
Method:
public function index()
{
$contas = login::all();
return response()->json(['contas'=>$contas], 200);
}