/** * Get the plural form of an English word. * * @param string $value * @param int $count * @return string */ function str_plural($value, $count = 2) { return Str::plural($value, $count); }
/** * Attempt to guess the name of the inverse of the relation. * * @return string */ protected function guessInverseRelation() { $relation = Str::plural(class_basename($this->getParent())); return Str::camel($relation); }
/** * Get the table associated with the model. * * @return string */ public function getTable() { if (isset($this->table)) { return $this->table; } return str_replace('\\', '', Str::snake(Str::plural(class_basename($this)))); }