Welcome Guest, Not a member yet? Register   Sign In
Custom controller - request object empty in constructor
#1

Hi,

i created my own controller:

PHP Code:
class CustomController extends BaseController {
  public function 
__construct() {
   
var_dump($this->request// NULL Why?
 
}
}
class 
Home extends CustomController {} 

The request object is empty. Can i use a constructor in controllers? I have no access to the request object and i think the __constuct will be called before initController but how can i access the request object in the constructor?
Reply


Messages In This Thread
Custom controller - request object empty in constructor - by groovebird - 06-22-2022, 10:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB