Browse Source

Model::table() uses class_basename() helper - which properly discards namespaces on *nix systems

Signed-off-by: Joe Wallace <joew@atiba.com>
Joe Wallace 12 years ago
parent
commit
f7aee0ca2a
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)));
 	}
 
 	/**