<?php

namespace App\Support;

class DealerContext
{
    public static function currentDealerId(): ?int
    {
        if (\function_exists('currentDealerId')) {
            return currentDealerId();
        }

        return app()->bound('currentDealerId')
            ? (int) app('currentDealerId')
            : null;
    }
}

