is there any ways that JavaScript can get the variable from compact controller Laravel-5.
Example: I have the code below:
$langs = Language::all()
$langs = Language::all()->toArray(); return View::make('NAATIMockTest.Admin.Language.index', [ 'langs' => $langs ]);
then in view
Its not pretty tho