public function delete() { foreach ($this->tickets()->fetchAll() as $ticket) { $ticket->delete(); } parent::delete(); }