laracasts / PHP-Vars-To-Js-Transformer

Transform PHP data to JavaScript.
https://packagist.org/packages/laracasts/utilities
MIT License
2.21k stars 219 forks source link

doesn't work for laravel 7 #133

Open da-production opened 4 years ago

da-production commented 4 years ago

i did all the steps and it doesn't work

mohitpawar10 commented 4 years ago

@da-production Can you put logs? What's the issue? Screenshot, system information and all... We can't debug without that.

mateo2181 commented 4 years ago

I am using Laravel 7 and it's working. @da-production remember by default variables are loaded in footer view/partialview.

amitavadeb commented 4 years ago

even i am struggling to make it work in v7. in v5, it worked great. it keeps saying: foo is undefined.

amrography commented 4 years ago

You have to set in javascript.php the correct path for the shared view file in your layout. ex:

bind_js_vars_to_this_view = 'app.include.myscriptsview'

the view app.include.myscriptsview should be there. And remember to remove the cache after your changes:

php artisan config:clear