<?php

namespace App\Services;

use App\Models\Tenant;

class ConfigurationService {

    public function getConfigurationService()
    {
        $tenantId = config('app.current_tenant_id');

        $tenant = Tenant::with(['payment_methods' => function($q) {
            $q->whereNotNull('source_name')
            ->whereNotNull('account_number')
            ->whereNotNull('receipent_name');
        }])
        ->where('uuid', $tenantId)
        ->first();

        return $tenant;
    }
}