Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Commit

Permalink
Demo
Browse files Browse the repository at this point in the history
  • Loading branch information
samturrell committed Nov 10, 2017
1 parent a8f34c9 commit bf8eb5f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -5,18 +5,26 @@

Inject Laravel routes into your Vue application via [aaronlord/laroute](https://github.com/aaronlord/laroute). I actually recommend the alternative and more slim-lined version of this package from [AXN-Informatique/laravel-laroute](https://github.com/AXN-Informatique/laravel-laroute).

[DEMO](https://samturrell.github.io/vue-laroute/example)

## Using this plugin

Adding vue-laroute to your application is as simple as any other plugin:

```js
import Vue from 'vue';

import VueLaroute from 'vue-laroute';
import routes from '../path/to/laroute.js';

Vue.use(VueLaroute, {
routes,
accessor: '$routes', // Optional: the global variable for accessing the router
});

new Vue({
el: '#app',
});
```

You can now access your global accessor (`$routes` by default) in any component via `this.$routes`, for example:
Expand Down

0 comments on commit bf8eb5f

Please sign in to comment.