public function unpopulateLockFields($id)
    {
        // $this->getSave($data);   --> creates new record ;-(
        // $this->getUpdate($data); --> integrity constraint violation: 1451 Cannot delete or
        //                              update a parent row: a foreign key constraint fails  ;-(
        // use the model, not the repository, to UPDATE
        $record = $this->model->findOrFail($id);

        // Locked by field allowed to be null
        $record->locked_by = null;
        $record->locked_at = null;

        return $record->save();
    }
public function unpopulateLockFields($id)
    {
        // $this->getSave($data);   --> creates new record ;-(
        // $this->getUpdate($data); --> integrity constraint violation: 1451 Cannot delete or
        //                              update a parent row: a foreign key constraint fails  ;-(
        // use the model, not the repository, to UPDATE
        $record = $this->model->findOrFail($id);

        // Locked by field allowed to be null
        $record->locked_by = null;
        $record->locked_at = null;

        return $record->save();
    }
public function unpopulateLockFields ( $ id ) { // $this->getSave($data);   --> creates new record ;-( // $this->getUpdate($data); --> integrity constraint violation: 1451 Cannot delete or //                              update a parent row: a foreign key constraint fails  ;-( // use the model, not the repository, to UPDATE $ record = $ this -> model -> findOrFail ( $ id ) ; // Locked by field allowed to be null $ record -> locked_by = null ; $ record -> locked_at = null ; return $ record -> save ( ) ; }
Un-populate the locked_at and locked_by fields.
By definition, this must be an UPDATE

All that is needed is the ID

@param  int     $id
@return mixed(?)
Un - populate the locked_at and locked_by fields . By definition this must be an UPDATE