mirror of https://github.com/pixelfed/pixelfed
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.
29 lines
580 B
PHTML
29 lines
580 B
PHTML
|
5 months ago
|
<?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,
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
}
|