Alshain Kodu ekleyince, verilen ilk cevaplarda birşeyler ters gitti hatası görülüyor.
public function subscribe(Dispatcher $events) {
$events->listen(Posted::class, [$this, 'postWasPosted']);
$events->listen(PostRestored::class, [$this, 'postWasRestored']);
$events->listen(PostHidden::class, [$this, 'postWasHidden']);
$events->listen(Started::class, [$this, 'discussionWasStarted']);
$events->listen(DiscussionRestored::class, [$this, 'discussionWasRestored']);
$events->listen(DiscussionHidden::class, [$this, 'discussionWasHidden']);
$events->listen(Saving::class, [$this, 'userWillBeSaved']);
$events->listen(Posted::class, [$this, 'ErkenCevap']);
}
public function ErkenCevap(Posted $event)
{
$discussmoney = (float)$this->settings->get('antoinefr-money.moneyfordiscussion', 0);
$postmoney = (float)$this->settings->get('antoinefr-money.moneyforpost', 0);
if ($event->post['number'] == 2 ) {
$post = $event->post['discussion_id'];
$kullanicipost = Post::query()->where('discussion_id', $post)
->where('user_id', $event->post->user_id)
->get()->count();
if (strlen(trim($event->post->content)) > 75 && $kullanicipost < 2) {
$this->giveMoney($event->post->user, $postmoney / 2);
}
}
}
Şuan sitedeki ayarlar bu şekilde.