-
packages/Webkul/Product/src/Observers/ProductObserver.php
Open in GitHubuse Illuminate\Support\Facades\Storage; class ProductObserver { public function deleted($product) { Storage::deleteDirectory('product/'.$product->id); } }
-
packages/Webkul/Product/src/Providers/ProductServiceProvider.php
Open in GitHubuse Webkul\Product\Models\ProductProxy; use Webkul\Product\Observers\ProductObserver; class ProductServiceProvider extends ServiceProvider { public function boot(): void { // ... ProductProxy::observe(ProductObserver::class); } // ... }