mirror of
https://github.com/flarum/framework.git
synced 2025-01-20 02:42:44 +08:00
parent
072f4f89cb
commit
fa14be591c
|
@ -108,7 +108,7 @@ class Discussion extends AbstractModel
|
|||
// PostWasDeleted event for each post.
|
||||
$posts = $discussion->posts()->allTypes();
|
||||
|
||||
foreach ($posts->get() as $post) {
|
||||
foreach ($posts->cursor() as $post) {
|
||||
$discussion->raise(new PostDeleted($post));
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ class User extends AbstractModel
|
|||
// PostWasDeleted event for each post.
|
||||
$posts = $user->posts()->allTypes();
|
||||
|
||||
foreach ($posts->get() as $post) {
|
||||
foreach ($posts->cursor() as $post) {
|
||||
$user->raise(new PostDeleted($post));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user