Pig Destroyer
Pig Destroyer

Reputation: 65

Named route does not exist for name : SLIM FRAMEWORK 3

Why i cant view the page when successful transaction in PayPal was done?

routes.php

$this->group('/paypal-transaction', function() {
     $this->get('', 'PortalPaypalTransactionController:show')->setName('portal.paypal_transaction');
});

and this is the code on my controller

$this->flash->addMessage('success', 'Load-up successful!');
    return $response->withRedirect($this->router->pathFor('portal/paypal-transaction'));

Upvotes: 0

Views: 1161

Answers (1)

jmattheis
jmattheis

Reputation: 11135

You are trying to get the path for portal/paypal-transaction but you declared it as portal.paypal_transaction. So adjust one of it to match the other.

Upvotes: 1

Related Questions