{"action":"created","issue":{"url":"https://api.github.com/repos/tightenco/ziggy/issues/70","repository_url":"https://api.github.com/repos/tightenco/ziggy","labels_url":"https://api.github.com/repos/tightenco/ziggy/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/tightenco/ziggy/issues/70/comments","events_url":"https://api.github.com/repos/tightenco/ziggy/issues/70/events","html_url":"https://github.com/tightenco/ziggy/issues/70","id":255294959,"node_id":"MDU6SXNzdWUyNTUyOTQ5NTk=","number":70,"title":"How do I use the `route` function in a compiled Vue component?","user":{"login":"simensen","id":191200,"node_id":"MDQ6VXNlcjE5MTIwMA==","avatar_url":"https://avatars1.githubusercontent.com/u/191200?v=4","gravatar_id":"","url":"https://api.github.com/users/simensen","html_url":"https://github.com/simensen","followers_url":"https://api.github.com/users/simensen/followers","following_url":"https://api.github.com/users/simensen/following{/other_user}","gists_url":"https://api.github.com/users/simensen/gists{/gist_id}","starred_url":"https://api.github.com/users/simensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simensen/subscriptions","organizations_url":"https://api.github.com/users/simensen/orgs","repos_url":"https://api.github.com/users/simensen/repos","events_url":"https://api.github.com/users/simensen/events{/privacy}","received_events_url":"https://api.github.com/users/simensen/received_events","type":"User","site_admin":false},"labels":[{"id":862082448,"node_id":"MDU6TGFiZWw4NjIwODI0NDg=","url":"https://api.github.com/repos/tightenco/ziggy/labels/Quick%20Kill","name":"Quick Kill","color":"49d633","default":false}],"state":"closed","locked":false,"assignee":{"login":"jakebathman","id":43112,"node_id":"MDQ6VXNlcjQzMTEy","avatar_url":"https://avatars0.githubusercontent.com/u/43112?v=4","gravatar_id":"","url":"https://api.github.com/users/jakebathman","html_url":"https://github.com/jakebathman","followers_url":"https://api.github.com/users/jakebathman/followers","following_url":"https://api.github.com/users/jakebathman/following{/other_user}","gists_url":"https://api.github.com/users/jakebathman/gists{/gist_id}","starred_url":"https://api.github.com/users/jakebathman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakebathman/subscriptions","organizations_url":"https://api.github.com/users/jakebathman/orgs","repos_url":"https://api.github.com/users/jakebathman/repos","events_url":"https://api.github.com/users/jakebathman/events{/privacy}","received_events_url":"https://api.github.com/users/jakebathman/received_events","type":"User","site_admin":false},"assignees":[{"login":"jakebathman","id":43112,"node_id":"MDQ6VXNlcjQzMTEy","avatar_url":"https://avatars0.githubusercontent.com/u/43112?v=4","gravatar_id":"","url":"https://api.github.com/users/jakebathman","html_url":"https://github.com/jakebathman","followers_url":"https://api.github.com/users/jakebathman/followers","following_url":"https://api.github.com/users/jakebathman/following{/other_user}","gists_url":"https://api.github.com/users/jakebathman/gists{/gist_id}","starred_url":"https://api.github.com/users/jakebathman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakebathman/subscriptions","organizations_url":"https://api.github.com/users/jakebathman/orgs","repos_url":"https://api.github.com/users/jakebathman/repos","events_url":"https://api.github.com/users/jakebathman/events{/privacy}","received_events_url":"https://api.github.com/users/jakebathman/received_events","type":"User","site_admin":false}],"milestone":null,"comments":21,"created_at":"2017-09-05T14:22:19Z","updated_at":"2018-10-21T06:08:10Z","closed_at":"2018-03-11T19:53:40Z","author_association":"NONE","body":"I'm using the following code:\r\n\r\n```\r\n                <div class=\"list-group\" v-if=\"projects.length > 0\">\r\n                    <a v-for=\"project in projects\" :href=\"route('api.project', {project_id: project.id})\" class=\"list-group-item\">{{ project.name }}</a>\r\n                </div>\r\n```\r\n\r\nBut I get the following error in console:\r\n\r\n![image](https://user-images.githubusercontent.com/191200/30065751-83cb7176-921b-11e7-880a-6cef790256f2.png)\r\n\r\nNote that both `route` and `namedRoutes` exist. I have `@route` above the `app.js` line in my layout."},"comment":{"url":"https://api.github.com/repos/tightenco/ziggy/issues/comments/431641756","html_url":"https://github.com/tightenco/ziggy/issues/70#issuecomment-431641756","issue_url":"https://api.github.com/repos/tightenco/ziggy/issues/70","id":431641756,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTY0MTc1Ng==","user":{"login":"prasetyo-jeanu","id":9801121,"node_id":"MDQ6VXNlcjk4MDExMjE=","avatar_url":"https://avatars3.githubusercontent.com/u/9801121?v=4","gravatar_id":"","url":"https://api.github.com/users/prasetyo-jeanu","html_url":"https://github.com/prasetyo-jeanu","followers_url":"https://api.github.com/users/prasetyo-jeanu/followers","following_url":"https://api.github.com/users/prasetyo-jeanu/following{/other_user}","gists_url":"https://api.github.com/users/prasetyo-jeanu/gists{/gist_id}","starred_url":"https://api.github.com/users/prasetyo-jeanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prasetyo-jeanu/subscriptions","organizations_url":"https://api.github.com/users/prasetyo-jeanu/orgs","repos_url":"https://api.github.com/users/prasetyo-jeanu/repos","events_url":"https://api.github.com/users/prasetyo-jeanu/events{/privacy}","received_events_url":"https://api.github.com/users/prasetyo-jeanu/received_events","type":"User","site_admin":false},"created_at":"2018-10-21T06:08:10Z","updated_at":"2018-10-21T06:08:10Z","author_association":"NONE","body":"add route method on mixin\r\n@montogeek \r\n\r\n`\r\nimport Vue from 'vue';\r\nimport {Ziggy} from './ziggy';\r\nimport route from '../../../vendor/tightenco/ziggy/src/js/route';\r\n\r\nVue.mixin({\r\n    methods: {\r\n        route: function ( name, params, absolute ) { return route(name, params, absolute, Ziggy); }\r\n    }\r\n});\r\n`\r\nhttps://github.com/tightenco/ziggy/issues/154#issuecomment-397841738"}}
{"actor":{"display_login":"prasetyo-jeanu"}}