mardi 30 avril 2019

how to return multiple results using api controller in laravel and vuejs

I,m building a project using Laravel and Vuejs, I'm using API controllers. I want to fetch the number of users.

User controller :

public function index() { return User::where('type','!=','admin'); }

User.vue :

axios.get('api/user').then(({data})=>(this.enseignants=data.data));



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2GTGQIG
via IFTTT

Aucun commentaire:

Enregistrer un commentaire