/** * @param string $name * @return string */ public function transformToForeignKeyColumnName($name) { return Inflector::underscore(Inflector::singularize($name)) . '_id'; }
/** * @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); }