Skip to content

Commit

Permalink
dynamically access batch options (#41361)
Browse files Browse the repository at this point in the history
Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
crynobone and taylorotwell committed Mar 7, 2022
1 parent 2c56f71 commit e6da0b8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Illuminate/Bus/Batch.php
Expand Up @@ -467,4 +467,15 @@ public function jsonSerialize()
{
return $this->toArray();
}

/**
* Dynamically access the batch's "options" via properties.
*
* @param string $key
* @return mixed
*/
public function __get($key)
{
return $this->options[$key] ?? null;
}
}

0 comments on commit e6da0b8

Please sign in to comment.