syntax error, unexpected 'endforeach' (T_ENDFOREACH), expecting elseif (T_EL syntax error, unexpected 'endforeach' (T_ENDFOREACH), expecting elseif (T_EL 这是因为,在blade模板里,写的代码:@if()xxxx@endif 需要在xxxx的两边 有空格