How I can check existing property $this->team->playerAssignment->player
in more rational way? Now I check it like this:
if ($this->team)
if (($this->team->playerAssignment))
if (($this->team->playerAssignment->player))
Try isset php function.
isset — Determine if a variable is set and is not NULL
if(isset($this->team->playerAssignment->player)){
}
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