Skip to content

Commit e6da0b8

Browse files
dynamically access batch options (#41361)
Co-authored-by: Taylor Otwell <[email protected]>
1 parent 2c56f71 commit e6da0b8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Illuminate/Bus/Batch.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,4 +467,15 @@ public function jsonSerialize()
467467
{
468468
return $this->toArray();
469469
}
470+
471+
/**
472+
* Dynamically access the batch's "options" via properties.
473+
*
474+
* @param string $key
475+
* @return mixed
476+
*/
477+
public function __get($key)
478+
{
479+
return $this->options[$key] ?? null;
480+
}
470481
}

0 commit comments

Comments
 (0)