jeudi 1 octobre 2015

Accessing env values in page Javascript in Laravel 5.1

I cannot find how to achieve this. I am looking to access an env value in a page's javascript in Laravel 5.1. Any help is appreciated!

I have tried the following without success:

var AppImagePath = "<?php echo {!! env('APP_IMG_PATH') !!}?>";

var AppImagePath = {!! env('APP_IMG_PATH') !!};



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire