Ejemplo n.º 1
0
Archivo: Ad.php Proyecto: elberd/maoh
 public static function boot()
 {
     parent::boot();
     Ad::deleting(function ($ad) {
         foreach ($ad->images as $image) {
             $image->delete();
         }
     });
 }