Example #1
0
 /**
  * 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');
 }
Example #2
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $this->info('Decrementing topics.');
     Topic::decrement('weight', Config::get('app.topics_decay'));
 }