I hope all are good there, I am developing web application in cakephp 5 and i need to redirect user when they no permission or they are not owner of particular article.. so i have already done some code this like create policy for user and article . I just need redirect from middleware and for this i would follow the cakephp 5 docs code example but its not working
this is middleware
now i set middleware class into authorization middleware but its not working just throw normal error
need to redirect rather then throw error