From 973bff4527a433fa039fd937ecfe048ed2325a5f Mon Sep 17 00:00:00 2001 From: Mohamed Said Date: Thu, 3 Aug 2017 15:06:57 +0200 Subject: [PATCH] default to empty array in BelongsToMany::create --- src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php b/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php index 4cd00718d188..4c0cad72b8d3 100755 --- a/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php +++ b/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php @@ -754,7 +754,7 @@ public function saveMany($models, array $pivotAttributes = []) * @param bool $touch * @return \Illuminate\Database\Eloquent\Model */ - public function create(array $attributes, array $joining = [], $touch = true) + public function create(array $attributes = [], array $joining = [], $touch = true) { $instance = $this->related->newInstance($attributes);