forss-it / laravel-gdpr-compliance

GDPR compliant data handling with ease
55 stars 5 forks source link

Redirect to original page from termsAccepted #79

Closed TomWhitson closed 3 years ago

TomWhitson commented 3 years ago

The termsAccepted function redirects automatically to / after the user accepts or denies the GDPR terms, I've tried setting the url in the session when showing the terms but it doesn't seem to work. Has anyone tried to get the accept/deny to return to the orginal url?

TomWhitson commented 3 years ago

Ok user error,

termsAccepted should return return redirect(session('link')); then the handle of the middleware needs session(['link' => $request->url()]);

all works after that