Closed srikanth240369 closed 7 years ago
I'm using 5.2 without any issues.
For me it is working , please refer ur empty blade in config file
'bind_js_vars_to_this_view' => 'footer'
same. nothing works.
I think author wont update this anymore. If anybody can - fork this and fix the problem.. I would do it, if I knew what's the problem.
Worked on my 5.2 all I did was
'bind_js_vars_to_this_view' => 'partials.footer',
@jbcanas I did all this. As name of the view I put 'app' - which is my main template. NOTHING works.
@autaut03 do you have some kind of js console errors?
@jbcanas UPD: everything works fine now. I did NOTHING. wtf..
@autaut03 that's great ;)
@jbcanas am binding to layouts.app
which is the main layout and getting error in console
Uncaught ReferenceError: injected is not defined
injected = namespace
@ctf0 this means injected variable is not present in your page. Does your code look like this?
Javascript::put([ 'injected' => $theCodeYouWantToSendToYourJavascript ]);
yeap, i think am getting the error because the item i have in the variable is temporary ?, i mean that var is only available under some condition, but if so how would i give it a default value so the error doesn't show up ?
It's not temporary because it's been declared globally. Can you type the injected variable in the console of your browsers dev tools and see if its there or undefined?
@jbcanas sorry for the late answer, just got home
did what u just told me and got new error Uncaught ReferenceError: injected is not defined(…)
@ctf0 it seems not working on your end. You can try to chat with me on gitter https://gitter.im/jbcanas/php-to-vars?utm_source=share-link&utm_medium=link&utm_campaign=share-link
okay 👍
It's not working for me too
just change 'bind_js_vars_to_this_view' => 'frontend.layouts.partials.js', 'js_namespace' => 'injected'
it will work
Remember to run php artisan vendor:publish
accordingly[1]
Also the command is different for Laravel 4.2 (laracasts/utilities 1.0+).
php artisan config:publish laracasts/utilities
Check the docs in 1.0/1.0.1 branch for details.
[1] https://laravel.com/docs/5.0/packages#publishing-file-groups
Previously I was used this package in laravel 5.1 & I recently Migrated to 5.2 there I am facing problem this package not working in 5.2 & I dont know suport is there for 5.2 or not