Warning: Undefined variable $factory in C:\xampp\htdocs\database\factories\DocumentFactory.php on line 10

Fatal error: Uncaught Error: Call to a member function define() on null in C:\xampp\htdocs\database\factories\DocumentFactory.php:10 Stack trace: #0 {main} thrown in C:\xampp\htdocs\database\factories\DocumentFactory.php on line 10