the browser-facing portion of osu!
at master 668 B view raw
1<?php 2 3// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 4// See the LICENCE file in the repository root for full licence text. 5 6declare(strict_types=1); 7 8namespace Database\Factories; 9 10use App\Libraries\MorphMap; 11use App\Models\Notification; 12 13class NotificationFactory extends Factory 14{ 15 protected $model = Notification::class; 16 17 public function definition(): array 18 { 19 return [ 20 'details' => [], 21 'name' => array_rand(Notification::NAME_TO_CATEGORY), 22 'notifiable_id' => rand(), 23 'notifiable_type' => array_rand_val(MorphMap::MAP), 24 ]; 25 } 26}