/** * Create a new event instance. * * @return void */ public function __construct(Status $status, User $user) { $this->status = $status; $this->user = $user; $this->notifiable = $status; $user->decrement('status_count'); }
/** * Create a new event instance. * * @return void */ public function __construct(Topic $topic, User $user) { $this->topic = $topic; $this->user = $user; $this->weight = 0; $this->karma = $topic->vote_count; $this->notifiable = $topic; $user->decrement('topic_count'); }
/** * Create a new event instance. * * @return void */ public function __construct(Reply $reply, Topic $topic, User $user) { $this->topic = $topic; $this->reply = $reply; $this->user = $user; $this->weight = Config::get('app.reply_gain_weight'); $this->karma = $reply->vote_count; $this->notifiable = $reply; $topic->decrement('reply_count'); $user->decrement('reply_count'); }