public function isLocked($id)
    {
        $record = $this->model->findOrFail($id);

        if ($record->locked_by > 0) return true;

        return false;
    }
public function isLocked($id)
    {
        $record = $this->model->findOrFail($id);

        if ($record->locked_by > 0) return true;

        return false;
    }
public function isLocked ( $ id ) { $ record = $ this -> model -> findOrFail ( $ id ) ; if ( $ record -> locked_by > 0 ) return true ; return false ; }
Is the record locked?
"Locked" is defined as the 'locked_by' field being populated; that is,> 0

@param  int     $id
@return bool
Is the record locked? Locked is defined as the locked_by field being populated ; that is > 0