From f7aee0ca2aef2bd6585f596ffa25884cc8d5aa97 Mon Sep 17 00:00:00 2001 From: Joe Wallace Date: Mon, 9 Apr 2012 11:28:40 -0500 Subject: [PATCH] Model::table() uses class_basename() helper - which properly discards namespaces on *nix systems Signed-off-by: Joe Wallace --- laravel/database/eloquent/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/database/eloquent/model.php b/laravel/database/eloquent/model.php index d9c88396..966a00c4 100644 --- a/laravel/database/eloquent/model.php +++ b/laravel/database/eloquent/model.php @@ -465,7 +465,7 @@ public function dirty() */ public function table() { - return static::$table ?: strtolower(Str::plural(basename(get_class($this)))); + return static::$table ?: strtolower(Str::plural(class_basename($this))); } /**