示例#1
0
 /**
  * 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);
 }
示例#2
0
 /**
  * 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);
 }
示例#3
0
 /**
  * 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))));
 }