Skip to content

Instantly share code, notes, and snippets.

@Jarlskov
Created July 15, 2016 09:42
Show Gist options
  • Save Jarlskov/6393adb21014c6af86cbac76d4293e95 to your computer and use it in GitHub Desktop.
Save Jarlskov/6393adb21014c6af86cbac76d4293e95 to your computer and use it in GitHub Desktop.
Delete
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