示例#1
0
 /**
  * @param string $name
  * @return string
  */
 public function transformToForeignKeyColumnName($name)
 {
     return Inflector::underscore(Inflector::singularize($name)) . '_id';
 }
示例#2
0
文件: Url.php 项目: lytc/sloths
 /**
  * @param Collection $collection
  * @param array $queryParams
  * @return string
  */
 public function add(Collection $collection, array $queryParams = [])
 {
     $tableName = $collection->getModel()->getTableName();
     return $this->to(Inflector::dasherize($tableName) . '/new', $queryParams);
 }