laravel中什么都没有出现

时间:2020-02-21 10:34:27

标签: php laravel vue.js laravel-5

我想制作一个使用laravel框架和vue.js的Web应用程序,然后进行必要的设置并添加该框架,并链接两个文件,然后运行浏览器以显示提示信息。

home.vue

<template>
    <div>

        <h1>zakaria sassi</h1>
    </div>
</template>

welcome.blade.php

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <title>Laravel</title>

        <!-- Fonts -->
        <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">


    </head>
    <body>
       <div id="app">
       <home></home>
       </div>

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

app.js

require('./bootstrap');

window.Vue = require('vue');


Vue.component(
'home',
  require('./components/home.vue'));


const app = new Vue({
  el: '#app',
  router,
});

webpack.mix.js

const mix = require('laravel-mix');


mix.js('resources/js/app.js', 'public/js')
   .sass('resources/sass/app.scss', 'public/css');

0 个答案:

没有答案