*/ class FileshareFactory extends Factory { /** * The name of the factory's corresponding model. * * @var class-string */ protected $model = Fileshare::class; /** * Define the model's default state. * * @return array */ public function definition() { return [ 'type' => '{}', 'name' => '', ]; } public function type(ConnectionType $type): self { return $this->state(['type' => $type]); } public function name(string $name): self { return $this->state(['name' => $name]); } }