. */ /* |-------------------------------------------------------------------------- | Model Factories |-------------------------------------------------------------------------- | | This directory should contain each of the model factory definitions for | your application. Factories provide a convenient way to generate new | model instances for testing / seeding your application's database. | */ namespace Database\Factories; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; /** * @property int $id * @property int $user_id * @property string $title * @property string $slug * @property string $description * @property int $cover_id * @property int $track_count * @property int $view_count * @property int $download_count * @property int $favourite_count * @property int $comment_count * @property \Carbon\Carbon $created_at * @property string $updated_at * @property \Carbon\Carbon $deleted_at */ class GenreFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = \App\Models\Genre::class; /** * Define the model's default state. * * @return array */ public function definition() { return [ 'name' => $this->faker->word, 'slug' => $this->faker->slug, ]; } }