8889841cvendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/BelongsToManyRelationship.php000066600000003232150521443250035062 0ustar00home/clixcotz/mars.clix.co.tzfactory = $factory; $this->pivot = $pivot; $this->relationship = $relationship; } /** * Create the attached relationship for the given model. * * @param \Illuminate\Database\Eloquent\Model $model * @return void */ public function createFor(Model $model) { Collection::wrap($this->factory instanceof Factory ? $this->factory->create([], $model) : $this->factory)->each(function ($attachable) use ($model) { $model->{$this->relationship}()->attach( $attachable, is_callable($this->pivot) ? call_user_func($this->pivot, $model) : $this->pivot ); }); } }