Fixed wrong trimming for "model" from filename to receive tablename #0
git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@117 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
@ -128,8 +128,8 @@ abstract class Model
|
||||
public function table()
|
||||
{
|
||||
if (! $this->table) {
|
||||
$this->table = rtrim(strtolower(get_class($this)), 'model');
|
||||
$this->table = substr(strtolower(get_class($this)), 0, -5/*strlen('Model')*/);
|
||||
}
|
||||
return $this->table;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user