Hi I am trying to check the variable is already set or not using blade version. But the raw php is working but the blade version is not. Any help?
控制器:
public function viewRegistrationForm()
{
$usersType = UsersType::all();
return View::make('search')->with('usersType',$usersType);
}
视图:
{{ $usersType or '' }}
it shows the error :
Undefined variable: usersType (View: C:\xampp\htdocs\clubhub\app\views\search.blade.php)