You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixelfed/database/factories/FollowerFactory.php

29 lines
580 B
PHP

<?php
namespace Database\Factories;
use App\Follower;
use App\Profile;
use Illuminate\Database\Eloquent\Factories\Factory;
class FollowerFactory extends Factory
{
protected $model = Follower::class;
public function definition(): array
{
return [
'profile_id' => Profile::factory(),
'following_id' => Profile::factory(),
'local_profile' => true,
];
}
public function remote(): static
{
return $this->state(fn (array $attributes) => [
'local_profile' => false,
]);
}
}