public function deleted(BanContract $ban): void
    {
        $bannable = $ban->bannable()->withBanned()->first();
        if ($bannable->bans->count() === 0) {
            $bannable->unsetBannedFlag()->save();

            event(new ModelWasUnbanned($bannable));
        }
    }
public function deleted(BanContract $ban): void
    {
        $bannable = $ban->bannable()->withBanned()->first();
        if ($bannable->bans->count() === 0) {
            $bannable->unsetBannedFlag()->save();

            event(new ModelWasUnbanned($bannable));
        }
    }
public function deleted ( BanContract $ ban ) : void { $ bannable = $ ban -> bannable ( ) -> withBanned ( ) -> first ( ) ; if ( $ bannable -> bans -> count ( ) === 0 ) { $ bannable -> unsetBannedFlag ( ) -> save ( ) ; event ( new ModelWasUnbanned ( $ bannable ) ) ; } }
Handle the deleted event for the Ban model.

@param \Cog\Contracts\Ban\Ban $ban
@return void
Handle the deleted event for the Ban model .