/** * Return parent relation field in right form * * @param $noun * @return string */ private function getParentKeyName($noun) { $method = Config::get('relationsNamingForm'); return Inflector\Inflector::$method($noun) . "_id"; }
/** * Get right form of table based on config * * @param $noun * @return mixed */ private function prepareForm($noun) { if (!(Config::get('urlNamingForm') === Config::get('tableNamingForm'))) { $method = Config::get('tableNamingForm'); return Inflector\Inflector::$method($noun); } else { return $noun; } }