Because it's difficult to explain properly, here's what I'm trying to do:
test.blade.php
//Above there is blade code
<script type="text/javascript">
foreach (test in tests) {
console.log("{!! Lang::get('message.$test.name') !!}")
}
</script>
So $test
is a JS variable which has a value in message.php
. If I replace $test
with the valure as a string, it works correctly. Is there any way to use a variable inside the Lang::get
call?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire