• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Redirect

#2
The redirect method returns a RedirectResponse class in CI4, which you must return from your methods. In Home2 it's doing parent::init(), but not returning the RedirectResponse if it is returned.

A second issue you'll run into, though, is that redirects cannot be returned from class constructors now, since we are using a class. You should instead look into using Controller Filters for those type of situations.
Support Development  • Practical CodeIgniter 3  • Vulcan - CLI Tools for CI4
Reply


Messages In This Thread
Redirect - by oliver - 12-06-2018, 12:57 PM
RE: Redirect - by kilishan - 12-06-2018, 01:56 PM
RE: Redirect - by oliver - 12-09-2018, 03:43 AM
RE: Redirect - by InsiteFX - 12-09-2018, 10:57 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.