*/ class NotificationFactory extends Factory { /** * The name of the factory's corresponding model. * * @var class-string */ protected $model = Notification::class; /** * Define the model's default state. * * @return array */ public function definition(): array { $data = [ 'title' => fake()->text(), 'body' => fake()->text(), 'image' => fake()->imageUrl(), ]; return [ Notification::ATTRIBUTE_ID => Str::uuid()->__toString(), Notification::ATTRIBUTE_TYPE => UserNotification::class, Notification::ATTRIBUTE_DATA => $data, ]; } }