*/ class RemoveIncidentUpdateCommandHandler { /** * The authentication guard instance. * * @var \Illuminate\Contracts\Auth\Guard */ protected $auth; /** * Create a new remove incident update command handler instance. * * @param \Illuminate\Contracts\Auth\Guard $auth * * @return void */ public function __construct(Guard $auth) { $this->auth = $auth; } /** * Handle the remove incident update command. * * @param \CachetHQ\Cachet\Bus\Commands\IncidentUpdate\RemoveIncidentUpdateCommand $command * * @return void */ public function handle(RemoveIncidentUpdateCommand $command) { $update = $command->incidentUpdate; event(new IncidentUpdateWasRemovedEvent($this->auth->user(), $update)); $update->delete(); } }