So here is the thing. I need someway to set a global variable for the whole controller.
I need it because all of the actions in the controller is going to need to receive the data via the GET method.
I thought that maybe placing it in the __construct will make it work like this:
public function __construct()
{
$this->team_id = Input::get('team_id');
}
But it says team_id is not found....
Thanks for your help, Ara
Do you set a global variable name $team_id in your controller class before set it into __construct ?
Because it will fail if you want to set an unknown variable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With