mardi 14 janvier 2020

how to get all column values in string in laravel

how to get all column values in string in laravel query, my query is,

$profile = DB::table('app_user')->where([
      'email' => $request->email,
      'password' => md5($request->password),
      'app_id' => $request->app_id
  ])->select('id as app_user_id','id','name','email','user_image','activate')
    ->first();

this return in object

 "app_user_id": 2857687,
 "id": 2857687,
 "name": "zahid"

I want to output like this

"app_user_id": "2857687",
"id": "2857687",
"name": "zahid"

I am using laravel 5.4

please help thanks in advance



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2QTCRRn
via IFTTT

Aucun commentaire:

Enregistrer un commentaire