'array', ]; protected static function booted(): void { static::addGlobalScope(new CompanyScope); static::creating(function (ApprovalFlow $approvalFlow){ $type =DisplayIndexObjectType::APPROVALFLOW; $displayIndex = IndexHelper::getObjectMaxIndex($type); $approvalFlow->display_id =$displayIndex; }); } public function createdBy() { return $this->belongsTo(User::class, "created_by"); } }