Merge pull request #518 from joecwallace/eloquent-model-table-basename-fix
Eloquent Model::table() bug fix
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user