From 6282216ebb5b803b916ce966dd9a39b420919477 Mon Sep 17 00:00:00 2001
From: Greg Sanderson <gregsanderson@vidbeo.com>
Date: Mon, 2 Sep 2024 00:03:54 +0100
Subject: [PATCH] Update Init.php to change how Laravel is detected

The init currently checks for Laravel by looking for laravel/laravel however a new Laravel 11 install does not include that.

As a result `isLaravelInstalled()` incorrectly returns false

That means it does not add the Laravel stub and so defaults to using phpunit for the base case in TestCase.php. Which then causes an undefined error when running any Feature test, including the example one.
---
 src/Plugins/Init.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Plugins/Init.php b/src/Plugins/Init.php
index 0b402652b..e695c1b5b 100644
--- a/src/Plugins/Init.php
+++ b/src/Plugins/Init.php
@@ -119,6 +119,6 @@ public function init(): void
      */
     private function isLaravelInstalled(): bool
     {
-        return InstalledVersions::isInstalled('laravel/laravel');
+        return InstalledVersions::isInstalled('laravel/laravel') || InstalledVersions::isInstalled('laravel/framework');
     }
 }