'integer', 'duration_minutes' => 'integer', 'has_negative_score' => 'boolean', 'is_free' => 'boolean', 'is_published' => 'boolean', ]; public function category() { return $this->belongsTo(QuizCategory::class, 'category_id'); } public function questions() { return $this->hasMany(Question::class, 'quiz_id')->orderBy('order'); } public function attempts() { return $this->hasMany(UserQuizAttempt::class, 'quiz_id'); } }