*/ class InvoicesController extends Controller { public function index(Customer $customer) { $invoices = $customer->invoices()->orderBy('due_date')->get(); return view('customers.invoices', compact('customer', 'invoices')); } }