Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. methods :{
  2. login(){
  3. var data ={
  4. client_id: 2,
  5. client_secret: '5YVQ6rsSehoh5BOWsxAU3KxGeqT1tCRGHn5dx1iX',
  6. grant_type: 'password',
  7. username : this.email,
  8. password: this.password
  9. }
  10. //send a GET request using Vue-Resource
  11. this.$http.get("http://localhost/kubikt2/public/api/login", data)
  12. .then(response=>{
  13. console.log(response)
  14.  
  15. })
  16.  
  17. }
  18.  
  19. }
  20.  
  21. Route::get('api/login',function(IlluminateHttpRequest $req){
  22.  
  23. $arr["echo"]=$req->all();
  24.  
  25. return json_encode($arr);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement