vendredi 31 octobre 2014

Laravel - Undefined variable


Vote count:

0




I'm having difficulty accessing a variable, when it's clearly there within the table.


The error falls on this line:



@if ($alert->alert_when == 1)
@endif


Undefined variable: alert_when - is the error.


I dd() the get() request prior to accessing the data in the view and I can see the variable it's retrieving:



["alert_when"]=> string(1) "1"


Why is this error occurring? Many thanks in advance.



asked 26 secs ago

Ben

443






Laravel - Undefined variable

Aucun commentaire:

Enregistrer un commentaire