/** * Find a field by it's scope and included fields that have been deleted * * @param integer $fieldId * @param string $fieldScope * @return DvsField || DvsGlobalField */ public function findTrashedFieldByIdAndScope($fieldId, $fieldScope) { return $fieldScope == 'global' ? $this->GlobalField->withTrashed()->find($fieldId) : $this->Field->withTrashed()->find($fieldId); }
/** * [findFieldByGlobalKeyAndLanguage description] * @param [type] $key * @param [type] $languageId * @return [type] */ public function findTrashedFieldByGlobalKeyAndLanguage($key, $languageId) { return $this->GlobalField->withTrashed()->where('key', $key)->where('language_id', $languageId)->first(); }