Merge pull request #518 from joecwallace/eloquent-model-table-basename-fix

Eloquent Model::table() bug fix
This commit is contained in:
Taylor Otwell
2012-04-09 19:55:34 -07:00

View File

@@ -465,7 +465,7 @@ abstract class Model {
*/
public function table()
{
return static::$table ?: strtolower(Str::plural(basename(get_class($this))));
return static::$table ?: strtolower(Str::plural(class_basename($this)));
}
/**