From 4309d8a8dd46401169d6b20f8bfa434e1df82d3d Mon Sep 17 00:00:00 2001 From: Caleb Porzio Date: Sun, 30 Jul 2017 02:09:05 -0400 Subject: [PATCH] Add empty array default to create method on belongs to many relationship --- 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 4c9fac593192..73ebe07cafef 100755 --- a/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php +++ b/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php @@ -740,7 +740,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);