File tree Expand file tree Collapse file tree 3 files changed +48
-17
lines changed Expand file tree Collapse file tree 3 files changed +48
-17
lines changed Original file line number Diff line number Diff line change 11
11
"laravel-elixir-webpack-official" : " ^1.0.2"
12
12
},
13
13
"dependencies" : {
14
+ "jquery" : " ^2.2.4" ,
14
15
"js-cookie" : " ^2.1.2" ,
15
16
"vue" : " ^1.0.26" ,
16
17
"vue-resource" : " ^0.9.3"
Original file line number Diff line number Diff line change 1
1
2
- window . Cookies = require ( 'js-cookie' ) ;
3
-
4
2
/**
5
- * Vue.js
6
- *
7
- * Vue is a modern JavaScript for building interactive web interfaces using
8
- * reacting data binding and reusable components. Vue's API is clean and
9
- * simple, leaving you to focus only on building your next great idea.
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
5
+ * building robust, powerful web applications using Vue and Laravel.
10
6
*/
11
- window . Vue = require ( 'vue' ) ;
12
7
13
- require ( 'vue-resource ' ) ;
8
+ require ( './bootstrap ' ) ;
14
9
15
10
/**
16
- * The XSRF Header
17
- *
18
- * We'll register a HTTP interceptor to attach the "XSRF" header to each of
19
- * the outgoing requests issued by this application. The CSRF middleware
20
- * included with Laravel will automatically verify the header's value.
11
+ * Next, we will create a fresh Vue application instance and attach it to
12
+ * the body of the page. From here, you may begin adding components to
13
+ * the application, or feel free to tweak this setup for your needs.
21
14
*/
22
- Vue . http . interceptors . push ( function ( request , next ) {
23
- request . headers [ 'X-XSRF-TOKEN' ] = Cookies . get ( 'XSRF-TOKEN' ) ;
24
15
25
- next ( ) ;
16
+ var app = new Vue ( {
17
+ el : 'body' ,
18
+
19
+ ready ( ) {
20
+ console . log ( 'Application ready.' ) ;
21
+ }
26
22
} ) ;
Original file line number Diff line number Diff line change
1
+
2
+ window . Cookies = require ( 'js-cookie' ) ;
3
+
4
+ /**
5
+ * We'll load jQuery and the Bootstrap jQuery plugin which provides support
6
+ * for JavaScript based Bootstrap features such as modals and tabs. This
7
+ * code may be modified to fit the specific needs of your application.
8
+ */
9
+
10
+ window . $ = window . jQuery = require ( 'jquery' ) ;
11
+
12
+ require ( 'bootstrap-sass/assets/javascripts/bootstrap' ) ;
13
+
14
+ /**
15
+ * Vue is a modern JavaScript for building interactive web interfaces using
16
+ * reacting data binding and reusable components. Vue's API is clean and
17
+ * simple, leaving you to focus only on building your next great idea.
18
+ */
19
+
20
+ window . Vue = require ( 'vue' ) ;
21
+
22
+ require ( 'vue-resource' ) ;
23
+
24
+ /**
25
+ * We'll register a HTTP interceptor to attach the "XSRF" header to each of
26
+ * the outgoing requests issued by this application. The CSRF middleware
27
+ * included with Laravel will automatically verify the header's value.
28
+ */
29
+
30
+ Vue . http . interceptors . push ( function ( request , next ) {
31
+ request . headers [ 'X-XSRF-TOKEN' ] = Cookies . get ( 'XSRF-TOKEN' ) ;
32
+
33
+ next ( ) ;
34
+ } ) ;
You can’t perform that action at this time.
0 commit comments