I have a question based on the routing with slim.
I have to routes.
Route 1:
/login
Route 2:
/stats
When a user want to get stats, a login is need first. But i don’t want to implement the login twice.
So my idea is, if a user called the /stats route, the /login route is called internal first.
But how can i redirect from /stats to /login?
Or should i implement the logic in a seperate method and call this method in /login and in /stats?