Laravel: Why is my variable not being set while it's in the construct function of the controller?
PHP Snippet 1:
parent::__construct();
PHP Snippet 2:
public function __construct() {
parent::__construct();
// do something
}
PHP Snippet 3:
class WSUsersController extends Controller
{
}
PHP Snippet 4:
$controller = New Controller();
$result['campaignRequest'] = $controller->getHost();
PHP Snippet 5:
public $host;
PHP Snippet 6:
public function __construct()
PHP Snippet 7:
parent::__construct();