public function getInvoices($id) { $invoice = Client::findOrFail($id)->invoices()->with('tasktime')->get(); return $invoice; }