is there any ways that JavaScript can get the variable from compact controller Laravel-5.
Example: I have the code below:
$langs = Language::all()
Try this - https://github.com/laracasts/PHP-Vars-To-Js-Transformer Is simple way to append PHP variables to Javascript.