src/Money/Module/Bank/Controller/Bank.php
protected function checkDelete()
    {
        $mapper = new BankMapper(Database::get('money'));

        $server = Server::getInstance();
        $post   = Post::getInstance();

        if ($server->isPost() && $post->has('delete')) {
            $bankId = (int) $post->get('delete');
            $bank   = $mapper->findById($bankId);

            if ($bank->exists()) {
                $mapper->delete($bank);

                $session = Session::getInstance();
                $session->setEphemeral('notification', serialize(new NotificationBootstrap('Bank "' . $bank->getName() . '"has been delete! ')));

                Server::getInstance()->redirect('/bank/list');
            }
        }
    }
protected function checkDelete()
    {
        $mapper = new BankMapper(Database::get('money'));

        $server = Server::getInstance();
        $post   = Post::getInstance();

        if ($server->isPost() && $post->has('delete')) {
            $bankId = (int) $post->get('delete');
            $bank   = $mapper->findById($bankId);

            if ($bank->exists()) {
                $mapper->delete($bank);

                $session = Session::getInstance();
                $session->setEphemeral('notification', serialize(new NotificationBootstrap('Bank "' . $bank->getName() . '"has been delete! ')));

                Server::getInstance()->redirect('/bank/list');
            }
        }
    }
Check & delete

@return void
@throws \Exception