I am trying to compare the value from my database by accessing foreach loop to a given string 'allowance' and the value of $scholar->scholarship_name in database is allowance also.So, it suppose to be true but I've got the error below...
Here is the error :
syntax error, unexpected '<'
Here is the code:
@foreach($scholars as $scholar)
{!! $scholar->sponsor_name !!}
{!! $scholar->scholarship_name !!}
11-7-2014
@if ( {!! $scholar->scholarship_name !!} == 'allowance')
I have one record!
@else
I don't have any records!
@endif
@endforeach
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2dhCl9s
via IFTTT
Aucun commentaire:
Enregistrer un commentaire