/** * Returns the prefix to the Generator. This can be "unique", or "optional". * * @return string */ protected function getPrefix() { $prefixes = array('unique', 'optional'); $prefix = current(explode(':', $this->getGenerator())); return Arr::has($prefixes, $prefix) ? $prefix : false; }
/** * Is the object saved? * * @param object $object The model instance. * * @return bool */ public function isSaved($object) { return Arr::has($this->saved, $object); }