Browse Source

Fixed Laravel 8 + legacy factories support

shalvah 4 years ago
parent
commit
29da1e920a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Tools/Utils.php

+ 1 - 1
src/Tools/Utils.php

@@ -118,7 +118,7 @@ class Utils
 
     public static function getModelFactory(string $modelName, array $states = [])
     {
-        if (!function_exists('factory')) {
+        if (!function_exists('factory')) { // Laravel 8 type factory
             $factory = call_user_func_array([$modelName, 'factory'], []);
             if (count($states)) {
                 foreach ($states as $state) {