Reputation: 11
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
Upvotes: 1
Views: 548
Reputation: 665
Make sure you include the script variables for spark
<script>
window.Spark = @json(array_merge(Spark::scriptVariables(), []));
</script>
In your <head></head>
Upvotes: 1
Reputation: 3454
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
Upvotes: 0