Askedio / laravel-soft-cascade

Cascade Delete & Restore when using Laravel SoftDeletes
https://medium.com/asked-io/cascading-softdeletes-with-laravel-5-a1a9335a5b4d
MIT License
705 stars 63 forks source link

Fix belongsTo #77

Closed rybakk closed 6 years ago

maguilar92 commented 6 years ago

@gcphost I think there's no need to make package work with belongsTo relation. The cascading must be defined in hasOne/hasMany, example:

Car hasMany Components Component belongsTo Car $component->car_id = $car->id cascading will be defined in Car because component depends on car and not the opposite. If I delete a component the car should not be erased.

gcphost commented 6 years ago

Your call @maguilar92 on that.

This PR has a lot of Immofacile name space changes, I didn't see that before. It'll have to be rejected.