client->primary_contact()->first(); $path = $invoice->client->client_hash . '/invoices/'; $file_path = $path . $invoice->number . '.pdf'; $disk = config('filesystems.default'); $file = Storage::disk($disk)->exists($file_path); if(!$file) { $file_path = CreateInvoicePdf::dispatchNow($invoice, $invoice->company, $contact); } //return $file_path; return Storage::disk($disk)->path($file_path); } }