Created
July 15, 2016 09:42
-
-
Save Jarlskov/6393adb21014c6af86cbac76d4293e95 to your computer and use it in GitHub Desktop.
Delete
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Event | |
{ | |
public function delete() | |
{ | |
foreach ($this->signups as $signup) { | |
$signup->delete(); | |
} | |
parent::delete(); | |
} | |
public function signups() | |
return $this->hasMany(\App\Event\Signup::class); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment