刀片 if(isset) 不工作 Laravel
嗨,我正在尝试检查变量是否已设置或未使用刀片版本。但是原始的php正在工作,但刀片版本却没有。有什么帮助吗?
控制器:
public function viewRegistrationForm()
{
$usersType = UsersType::all();
return View::make('search')->with('usersType',$usersType);
}
视图:
{{ $usersType or '' }}
它显示错误:
未定义的变量: usersType (View: C:\xampp\htdocs\clubhub\app\views\search.blade.php)