简体   繁体   中英

How Get ids from array response vue js

hello let's say i have a response data using axios vue js from laravel:

my example:


getApps(page = 1){


 
     axios.get('/api/getappforms')
     .then(response =>
     { 

   apps = response.data
  
 }
     ).catch(err => console.log(err));



}

and my laravel method:


$DataApps = Appclications::select('application.*','wilayas.name as wilaya','dairas.name as daira_field','communes.name as commune_field')
->leftJoin('dairas','dairas.id','=','application.id_daira')
->leftJoin('wilayas','wilayas.id','=','application.id_wilaya')

->leftJoin('communes','communes.id','=','application.id_commune')
->paginate(15);


    return   response()->json($DataApps);

every thing works fine just i want to fetch or get just ids in vue js from apps var and stored in another array

please help

hello let's say i have a response data using axios vue js from laravel:

my example:


getApps(page = 1){


 
     axios.get('/api/getappforms')
     .then(response =>
     { 

   apps = response.data
  
 }
     ).catch(err => console.log(err));



}

and my laravel method:


$DataApps = Appclications::select('application.*','wilayas.name as wilaya','dairas.name as daira_field','communes.name as commune_field')
->leftJoin('dairas','dairas.id','=','application.id_daira')
->leftJoin('wilayas','wilayas.id','=','application.id_wilaya')

->leftJoin('communes','communes.id','=','application.id_commune')
->paginate(15);


    return   response()->json($DataApps);

every thing works fine just i want to fetch or get just ids in vue js from apps var and stored in another array

please help

hello let's say i have a response data using axios vue js from laravel:

my example:


getApps(page = 1){


 
     axios.get('/api/getappforms')
     .then(response =>
     { 

   apps = response.data
  
 }
     ).catch(err => console.log(err));



}

and my laravel method:


$DataApps = Appclications::select('application.*','wilayas.name as wilaya','dairas.name as daira_field','communes.name as commune_field')
->leftJoin('dairas','dairas.id','=','application.id_daira')
->leftJoin('wilayas','wilayas.id','=','application.id_wilaya')

->leftJoin('communes','communes.id','=','application.id_commune')
->paginate(15);


    return   response()->json($DataApps);

every thing works fine just i want to fetch or get just ids in vue js from apps var and stored in another array

please help

hello let's say i have a response data using axios vue js from laravel:

my example:


getApps(page = 1){


 
     axios.get('/api/getappforms')
     .then(response =>
     { 

   apps = response.data
  
 }
     ).catch(err => console.log(err));



}

and my laravel method:


$DataApps = Appclications::select('application.*','wilayas.name as wilaya','dairas.name as daira_field','communes.name as commune_field')
->leftJoin('dairas','dairas.id','=','application.id_daira')
->leftJoin('wilayas','wilayas.id','=','application.id_wilaya')

->leftJoin('communes','communes.id','=','application.id_commune')
->paginate(15);


    return   response()->json($DataApps);

every thing works fine just i want to fetch or get just ids in vue js from apps var and stored in another array

please help

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM