public function __construct($app = null) { if (!$app) { $app = app(); //Fallback when $app is not given } $this->app = $app; $this->version = $app->version(); $this->is_lumen = str_contains($this->version, 'Lumen'); }