public function deletable($id)
    {
        $record = $this->modelRepository->findOrFail($id);

        if ( ! $this->isModelDeletable($record)) {
            return $this->failureResponse(
                $this->getLastUnmetDeleteConditionMessage()
            );
        }

        return $this->successResponse();
    }
public function deletable($id)
    {
        $record = $this->modelRepository->findOrFail($id);

        if ( ! $this->isModelDeletable($record)) {
            return $this->failureResponse(
                $this->getLastUnmetDeleteConditionMessage()
            );
        }

        return $this->successResponse();
    }
public function deletable ( $ id ) { $ record = $ this -> modelRepository -> findOrFail ( $ id ) ; if ( ! $ this -> isModelDeletable ( $ record ) ) { return $ this -> failureResponse ( $ this -> getLastUnmetDeleteConditionMessage ( ) ) ; } return $ this -> successResponse ( ) ; }
Checks whether a model is deletable.

@param mixed $id
@return mixed
Checks whether a model is deletable .