<?php

namespace App\Http\Controllers;

use App\Models\Creance;
use Illuminate\Http\Request;

class InvoiceController extends Controller
{
    /**
     * Liste des factures impayées
     */
    public function __invoke(Request $request)
    {
        $impayes = Creance::where('statut', 'impaye')
            ->latest()->paginate(10)->get();

        dd($impayes);

        return view('factures.index');
    }
}
