when i run this
$User_data = User::where('email', '=', $email)
->leftJoin('secutitequestion', function($join) {
$join->on('users.id', '=', 'secutitequestion.user_id');
})
->select('secutitequestion.securite_question1'
,'secutitequestion.securite_question2'
,'secutitequestion.securite_question3'
,'secutitequestion.user_id')
->get();
i get this result
{ "success": true, "token": null, "user": [ { "securite_question1": "what is your dream", "securite_question2": "other dream?", "securite_question3": "any other dream?", "user_id": 32 } ] }
but i want it like this
{ "success": true, "token": null, "user" { "securite_question1": "what is your dream", "securite_question2": "other dream?", "securite_question3": "any other dream?", "user_id": 32 } }
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire