I am trying to update a column named 'is_shared' in laravel but it is giving error.
I tried.
public static function setShared($key, $status = true){
$input = ScorecardInputMeta::where("key", $key)->first();
if($input){
$input->is_shared = $status;
$input->save;
}
}//end function
Error: {"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"Call to a member function getResults() on boolean","file":"D:\Projects\hbi_private\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php","line":2070}}
Assuming
ScorecardInputMeta
is anEloquent Model
, try: