This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

phplee
phplee

Im building a shopping cart and need a 'Back' button if the basket is empty. ive tried

 {{ url()->previous() }}

But this throws and error.

thanks

Last updated

pivisions
pivisions

You will have to do it in PHP Code.

Try this:

Use Url;
$this->page["return_url"] = Url::previous();

In twig

{{return_url}}

Have Fun!

Last updated

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.