1

I using spark in laravel with vue.js. I add in home.blade.php and I got this error:

Uncaught ReferenceError: Spark is not defined

what I had done:

php artisan spark:install 
Alan Yong
  • 11
  • 1

2 Answers2

1

Make sure you include the script variables for spark

<script>
    window.Spark = @json(array_merge(Spark::scriptVariables(), []));
</script>

In your <head></head>

Zac Grierson
  • 656
  • 1
  • 6
  • 21
0

You need to either install the Spark Installer or install via Composer before you can use php artisan spark commands.

See installation info at https://spark.laravel.com/docs/5.0/installation#installation

kerrin
  • 3,376
  • 1
  • 26
  • 36