Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- methods :{
- login(){
- var data ={
- client_id: 2,
- client_secret: '5YVQ6rsSehoh5BOWsxAU3KxGeqT1tCRGHn5dx1iX',
- grant_type: 'password',
- username : this.email,
- password: this.password
- }
- //send a GET request using Vue-Resource
- this.$http.get("http://localhost/kubikt2/public/api/login", data)
- .then(response=>{
- console.log(response)
- })
- }
- }
- Route::get('api/login',function(IlluminateHttpRequest $req){
- $arr["echo"]=$req->all();
- return json_encode($arr);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement