File tree Expand file tree Collapse file tree 4 files changed +16
-22
lines changed Expand file tree Collapse file tree 4 files changed +16
-22
lines changed Original file line number Diff line number Diff line change 5
5
"dev" : " gulp watch"
6
6
},
7
7
"devDependencies" : {
8
+ "axios" : " ^0.15.2" ,
8
9
"bootstrap-sass" : " ^3.3.7" ,
9
10
"gulp" : " ^3.9.1" ,
10
11
"jquery" : " ^3.1.0" ,
11
12
"laravel-elixir" : " ^6.0.0-11" ,
12
13
"laravel-elixir-vue-2" : " ^0.2.0" ,
13
14
"laravel-elixir-webpack-official" : " ^1.0.2" ,
14
15
"lodash" : " ^4.16.2" ,
15
- "vue" : " ^2.0.1" ,
16
- "vue-resource" : " ^1.0.3"
16
+ "vue" : " ^2.0.1"
17
17
}
18
18
}
Original file line number Diff line number Diff line change 1
1
2
2
/**
3
3
* First we will load all of this project's JavaScript dependencies which
4
- * include Vue and Vue Resource. This gives a great starting point for
4
+ * includes Vue and other libraries. It is a great starting point when
5
5
* building robust, powerful web applications using Vue and Laravel.
6
6
*/
7
7
Original file line number Diff line number Diff line change @@ -17,19 +17,14 @@ require('bootstrap-sass');
17
17
*/
18
18
19
19
window . Vue = require ( 'vue' ) ;
20
- require ( 'vue-resource' ) ;
21
20
22
21
/**
23
- * We'll register a HTTP interceptor to attach the "CSRF" header to each of
24
- * the outgoing requests issued by this application. The CSRF middleware
25
- * included with Laravel will automatically verify the header's value.
22
+ * We'll load the axios HTTP library which allows us to easily issue requests
23
+ * to our Laravel back-end. This library automatically handles sending the
24
+ * CSRF token as a header based on the value of the "XSRF" token cookie .
26
25
*/
27
26
28
- Vue . http . interceptors . push ( ( request , next ) => {
29
- request . headers . set ( 'X-CSRF-TOKEN' , Laravel . csrfToken ) ;
30
-
31
- next ( ) ;
32
- } ) ;
27
+ window . axios = require ( 'axios' ) ;
33
28
34
29
/**
35
30
* Echo exposes an expressive API for subscribing to channels and listening
You can’t perform that action at this time.
0 commit comments