Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: redirect() in base controller
Post: RE: redirect() in base controller

Hi, @InsiteFX : I tought about filter but... checkAccess function need parameters that are different for each controller. I explain : each controller list, in an array, roles that can access it...
2,945 Views
10 Replies
03-24-2023, 05:50 AM
sTis
    Thread: redirect() in base controller
Post: RE: redirect() in base controller

Somebody can help ??? What I'm I doing wrong ?? I'm still on my way to achieve my function checkRole working correctly. Kenjis said it must return an redirectResponse object. So I've changed my lib...
2,945 Views
10 Replies
03-19-2023, 09:55 AM
sTis
    Thread: redirect() in base controller
Post: RE: redirect() in base controller

Thanks for your clues ! I succeeded by changing two three things. I'm not sure that the best way to do it but it works. I've loaded "response" as a service. Can't succeeded to make it works with "...
2,945 Views
10 Replies
03-17-2023, 03:02 AM
sTis
    Thread: redirect() in base controller
Post: RE: redirect() in base controller

Thank for your answer. I saw that in ci4 documentation but.. I'm not sure how to do that. Could you explain it please ? Function check is in standard baseController.
2,945 Views
10 Replies
03-16-2023, 06:00 AM
sTis
    Thread: redirect() in base controller
Post: redirect() in base controller

Hi, In my baseController I've got a function that check if user's role is compatible with the controller's roles. Here is this function : PHP Code: -- function check(array $roles) {            ...
2,945 Views
10 Replies
03-16-2023, 02:18 AM
sTis
    Thread: Trying to make recursive function : no data return
Post: RE: Trying to make recursive function : no data re...

What's stange is that $data in else statement are right (see below). In my example, I have 3 entities to return. $data is correctly populated. everything seems to work fine except the return function...
2,508 Views
9 Replies
12-25-2022, 07:37 AM
sTis
    Thread: Trying to make recursive function : no data return
Post: RE: Trying to make recursive function : no data re...

Thanks all for your answers, @bassmanc : I've tried yours propositions. It's not the solution. In fact my model call works : I've got results in my recursive function in app/models/testsModel.php. @...
2,508 Views
9 Replies
12-20-2022, 01:45 PM
sTis
  Wink Thread: Trying to make recursive function : no data return
Post: RE: Trying to make recursive function : no data re...

Hi, Thank for your answer. Sorry for the long time before my return. I've edited my code (see in my first post). I've try to eliminate the array as you suggested. But, the array() is useful for com...
2,508 Views
9 Replies
12-19-2022, 01:29 AM
sTis
    Thread: Trying to make recursive function : no data return
Post: Trying to make recursive function : no data return

Hello, I'm trying to make a function that get data recursively to get parents of an entity. And also parents of the parents. If an entity is at the root is parent is set to null. My database ...
2,508 Views
9 Replies
12-04-2022, 09:14 AM
sTis

Theme © iAndrew 2016 - Forum software by © MyBB