We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f0352e commit 6ba1b83Copy full SHA for 6ba1b83
src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php
@@ -63,7 +63,7 @@ public function fillable(array $fillable)
63
*/
64
public function mergeFillable(array $fillable)
65
{
66
- $this->fillable = array_merge($this->fillable, $fillable);
+ $this->fillable = array_values(array_unique(array_merge($this->fillable, $fillable)));
67
68
return $this;
69
}
@@ -101,7 +101,7 @@ public function guard(array $guarded)
101
102
public function mergeGuarded(array $guarded)
103
104
- $this->guarded = array_merge($this->guarded, $guarded);
+ $this->guarded = array_values(array_unique(array_merge($this->guarded, $guarded)));
105
106
107
0 commit comments