芝麻web文件管理V1.00
编辑当前文件:/home/sditechnicalteam/public_html/app/Observers/ProductObserver.php
last_updated_by = user() ? user()->id : null; } } public function creating(Product $product) { if (!isRunningInConsoleOrSeeding()) { $product->added_by = user() ? user()->id : null; } if (company()) { $product->company_id = company()->id; } } public function deleting(Product $product) { $product->files()->each(function ($file) { $file->delete(); }); } }