public function __construct($app = null) { if (!$app) { $app = app(); //Fallback when $app is not given } $this->app = $app; }