Commit 9ee9e7bb authored by Taylor Otwell's avatar Taylor Otwell

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

Eloquent Model::table() bug fix
parents b7ac1b75 f7aee0ca
...@@ -465,7 +465,7 @@ abstract class Model { ...@@ -465,7 +465,7 @@ abstract class Model {
*/ */
public function table() public function table()
{ {
return static::$table ?: strtolower(Str::plural(basename(get_class($this)))); return static::$table ?: strtolower(Str::plural(class_basename($this)));
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment