where('option_name', $option_name)->first(); if ($schema) { $status = $schema->status; } return $status; } public function getOptionValue($option, $field = '') { $schema = $this->where('option_name', $option); if ($field != '') { $schema = $schema->where('optional_field', $field); return $schema->first(); } $value = $schema->get(); return $value; } }