我跟着这个tutorial,我正在“ Passport默认的Vue前端”。现在的问题是在 Laravel 5.3 中显示的 Vue组件 不。
resources / js / app.js :
var Vue = require('vue');
reuire('./bootstrap');
Vue.component('example', require('./components/Example.vue'));
Vue.component(
'passport-clients',
require('./components/passport/Clients.vue')
);
Vue.component(
'passport-authorized-clients',
require('./components/passport/AuthorizedClients.vue')
);
Vue.component(
'passport-personal-access-tokens',
require('./components/passport/PersonalAccessTokens.vue')
);
const app = new Vue({
el: 'body'
});
resources / views / home.blade.php :
@extends('layouts.app')
@section('content')
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<div class="container">
<div class="row">
<passport-clients></passport-clients>
<passport-authorized-clients></passport-authorized-clients>
<passport-personal-access-tokens></passport-personal-access-tokens>
</div>
@endsection
答案 0 :(得分:2)
运行“npm install”并gulp。这应该可以解决您的问题。
答案 1 :(得分:0)
<强>布局/ app.blade.php 强>
<script src="{{ elixir('/js/app.js') }}"></script>
</body>