mercredi 25 janvier 2017

Trying to combinate Laravel, Rest API and AngularJS

At the moment I'm trying to combinate a Rest API and AngularJS (1.6) with Laravel 5. This means I am learning on own ideas in a project.

If the user is logged in and going on the home site, he gets a small statistic about his deposited data. This url calls xxx.dev/home for example.

In an app.js I want to call his data by http.get('/api/dashboard/' + id).

My question is: How can I set the user id from Laravel into the app.js for a dynamic query.

At the moment I still work with var id = 1.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire