Welcome Guest, Not a member yet? Register   Sign In
Bug (?) by using ResponseTrait within a filter
#5

(10-15-2022, 05:37 AM)kenjis Wrote: It does not work as expected.
Because the constructor cannot return a Response object.
Controller should return a Response object.

And in a filter, what you do is just return the Response object that you want.
See https://codeigniter4.github.io/CodeIgnit...ponse.html

@kenjis thanks for the clarification. Then the correct way is to use a filter for things (not only the access check) i want to execute every time the controller is executed?
Reply


Messages In This Thread
RE: Bug by using ResponseTrait within a filter - by groovebird - 10-15-2022, 06:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB