Browse Source

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

Eloquent Model::table() bug fix
Taylor Otwell 12 years ago
parent
commit
9ee9e7bb5e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      laravel/database/eloquent/model.php

+ 1 - 1
laravel/database/eloquent/model.php

@@ -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)));
 	}
 
 	/**