Procházet zdrojové kódy

Merge pull request #288 from SquareBeard/fix-factory-error-detection

Fix factory error detection
Shalvah před 4 roky
rodič
revize
3189f488d3
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/Tools/Utils.php

+ 1 - 1
src/Tools/Utils.php

@@ -200,7 +200,7 @@ class Utils
             try {
                 $factory = factory($modelName);
             } catch (\Throwable $e) {
-                if (Str::contains($e->getMessage(), "Call to undefined function Knuckles\Scribe\Tools\factory()")) {
+                if (Str::contains($e->getMessage(), "Call to undefined function Knuckles\\Scribe\\Tools\\factory()")) {
                     throw new \Exception("Couldn't find the Eloquent model factory. Did you add the HasFactory trait to your $modelName model?");
                 } else {
                     throw $e;