jeudi 28 juin 2018

Laravel: echo javascript function if a certain session variable is present

Is it possible to do something like this ...

@if(Session::has('foo'))
    <script>
    // My JavaScript function
    </script>
@endif

I am trying to put Facebook pixel code only if a certain session variable is there.

Please advise.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire