<?php

namespace App\Services\Expenses;

use Illuminate\Http\UploadedFile;

class ExpenseReceiptService
{
    public function storeReceipt(UploadedFile $file): string
    {
        $stored = $file->store('receipts');
        return basename($stored);
    }

    public function receiptUrl(?string $filename): ?string
    {
        if (!$filename) {
            return null;
        }
        return url('receipts/' . $filename);
    }
}
