<?php

namespace App\Http\Controllers;

use App\Domain\Financial\Models\Invoice;
use Illuminate\Http\Request;

class InvoicePrintController extends Controller
{
    public function __invoke(Invoice $invoice)
    {
        $this->authorize('invoices.view');

        $invoice->load(['items', 'payments', 'billable']);

        return view('print.invoice', compact('invoice'));
    }
}
