Passport组件未在Laravel 5.3中显示

时间:2016-11-27 03:27:38

标签: php vue.js laravel-5.3 laravel-passport

我跟着这个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

2 个答案:

答案 0 :(得分:2)

运行“npm install”并gulp。这应该可以解决您的问题。

答案 1 :(得分:0)

你正在布局中调用你的app.js吗?即。

<强>布局/ app.blade.php

  <script src="{{ elixir('/js/app.js') }}"></script>
</body>