mardi 27 mars 2018

Laravel - evn sometimes returning null after javascript location.reload();

Im having a problem where laravel is sometimes returning null for my environment variables after location.reload(); What makes it really annoying is that it doesent seem to be 100% reproducable and i cant pin down in what exact situations it happens.

In my blade tempalte i have the follwoing code:

<?php
$env = env('asdfasdf');
if($env != null){
    print "<!-- not null " . env('asdfasdf') . " -->";
} else {
    print "<!-- null " . env('asdfasdf') . " -->";
}
?>

On first page load i always get <!-- not null asdfasdf -> as the result. But when i trigger javascript location.reload(); then sometimes i get <!-- null -->.

Any ideas?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2pIDEXn
via IFTTT

Aucun commentaire:

Enregistrer un commentaire