DRY approach with different request type |
You're better off extending the controllers from a "base" one which has this check in it.
http://www.codeigniter.com/userguide3/ge...core-class PHP Code: class Welcome extends MY_Controller { Then in MY_Controller you can put your check code in the constructor and redirect if it fails, as you said. |
Messages In This Thread |
DRY approach with different request type - by geekita - 10-17-2016, 03:54 PM
RE: DRY approach with different request type - by JayAdra - 10-17-2016, 04:43 PM
RE: DRY approach with different request type - by geekita - 10-18-2016, 03:51 AM
RE: DRY approach with different request type - by JayAdra - 10-18-2016, 06:23 AM
RE: DRY approach with different request type - by dave friend - 10-18-2016, 06:43 AM
RE: DRY approach with different request type - by geekita - 10-18-2016, 06:46 AM
RE: DRY approach with different request type - by dave friend - 10-18-2016, 06:54 AM
RE: DRY approach with different request type - by geekita - 10-18-2016, 07:25 AM
|