mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-02 21:14:35 -04:00
Delete pdf in service rather than child job
This commit is contained in:
parent
839a5c49d3
commit
18e8934e70
@ -22,6 +22,7 @@ use App\Models\Task;
|
||||
use App\Services\Client\ClientService;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class InvoiceService
|
||||
{
|
||||
@ -273,8 +274,9 @@ class InvoiceService
|
||||
|
||||
public function deletePdf()
|
||||
{
|
||||
UnlinkFile::dispatchNow(config('filesystems.default'), $this->invoice->client->invoice_filepath() . $this->invoice->number.'.pdf');
|
||||
|
||||
//UnlinkFile::dispatchNow(config('filesystems.default'), $this->invoice->client->invoice_filepath() . $this->invoice->number.'.pdf');
|
||||
Storage::disk(config('filesystems.default'))->delete($this->invoice->client->invoice_filepath() . $this->invoice->number.'.pdf');
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user