Search code examples
laravellaravel-7

What is purpose of using @ sign with Model


What is purpose of @ sign with model in controller

 if($request->has('update'))
        {
            $userData = User::findOrFail($request->userID);
            $isvalid = @$userData->isvalid == '1' ? 'checked' : '';
        }

Solution

  • It's a PHP operator helps to ignore warnings and errors