Categories
How to pass array to js from laravel controller?
Tell me, how are values passed from the framework to JS?
Answer the question
In order to leave comments, you need to log in
For example, like this or something like:var arr = {{$array}};
var arr = {{$array}};
Encode in json and add to the data-attribute to some element and consider it a client already. In general, ajax is better.
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question