Closed broskees closed 1 year ago
@Log1x Sure. The use case I ran into was I wanted a default image url from my theme and wanted to use the public_path()
function to resolve it. I could not do this though because the example variable is static.
Basically any time you want to use a method/function call in the example data, you would need to use the example()
method.
@Log1x Anything else I can do to get this merged? Found myself needing it again today.
You could always do:
...
use Roots\Acorn\Application;
...
public function __construct(Application $app)
{
$this->example = $this->example();
parent::__construct($app);
}
Thanks for the PR. Not against this whatsoever, but could you provide a use-case/example for needing this?