From d31f89d42f716b08b3fd3369d7b5d53aefcaca2d Mon Sep 17 00:00:00 2001 From: Joe Wallace Date: Thu, 9 Aug 2012 22:10:49 -0500 Subject: [PATCH] Fixing a bug with saving data to pivot table --- laravel/database/eloquent/pivot.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/laravel/database/eloquent/pivot.php b/laravel/database/eloquent/pivot.php index d2878bb5..a90d7e7d 100644 --- a/laravel/database/eloquent/pivot.php +++ b/laravel/database/eloquent/pivot.php @@ -26,7 +26,7 @@ class Pivot extends Model { public function __construct($table, $connection = null) { $this->pivot_table = $table; - $this->connection = $connection; + static::$connection = $connection; parent::__construct(array(), true); } @@ -41,14 +41,4 @@ public function table() return $this->pivot_table; } - /** - * Get the connection used by the pivot table. - * - * @return string - */ - public function connection() - { - return $this->connection; - } - } \ No newline at end of file