mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-22 17:32:14 +00:00
Delete invoice
This commit is contained in:
@@ -7,6 +7,7 @@ use Auth;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
use Laravel\Scout\Searchable;
|
||||
use TeamTNT\TNTSearch\Indexer\TNTIndexer;
|
||||
@@ -70,5 +71,9 @@ class Invoice extends Model
|
||||
|
||||
$invoice->currency = 'CZK';
|
||||
});
|
||||
|
||||
static::deleting(function ($invoice) {
|
||||
Storage::delete(invoice_path($invoice));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user