Thursday, March 9, 2017

Setting up vue and laravel trouble

Here is my gulpfile.js file

var elixir = require('laravel-elixir');
require('laravel-elixir-webpack');

elixir(function(mix) {

   mix.styles([
      'vendor.css',
      'font-awesome.css',
      'theme-default.css',
      'custom.css'
      ],'public/assets/css/index.css');

     mix.scripts([
      'vendor.js',
      'demodata.js',
      'app.js',
      'demo.js'
      ],'public/assets/js/index.js');

   mix.webpack('main.js');
   mix.version('js/main.js','assets/css/index.css','assets/js/index.js');

});

And here is my master.blade.php

<!DOCTYPE html>
<html lang= "en">
<head>
    <meta charset = "utf-8">
    <title>Wiredcademy | @yield('title')</title>
     <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, shrink-to-fit=no">
     <meta name="format-detection" content="telephone=no">
     <link href="http://fonts.googleapis.com/css?family=Montserrat:400,700%7cSource+Sans+Pro:200,400,600,700,900,400italic,700italic&amp;subset=latin,latin-ext" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="">
</head>
    <body class="index menu-default hover-default scroll-animation">    

    @yield('contents')

    <script src=""></script>
    <script src=""></script>
</body>
</html>

I'm fairly new to using gulp. So I did type gulp and gulp watch commands to keep track of scripts and stylesheets and changes to my main.js respectively But when I deploy the app through php artisan serve.

it says:

File assets/css/index.css not defined in asset manifest. (View: A:\xampp\htdocs\restate\resources\views\layouts\master.blade.php) (View: A:\xampp\htdocs\restate\resources\views\layouts\master.blade.php)



via A. Sand

Advertisement