'integer', ]; /** * The "booted" method of the model. */ protected static function booted(): void { static::creating(function (ExamFaq $faq) { // Handle sort if (is_null($faq->sort)) { $faq->sort = static::getNextSortValue(); } }); } public function exam(): BelongsTo { return $this->belongsTo(Exam::class); } }