I have the class but I get an error, why?
As you can see it:
Because you didn't run composer dumpauto
command after you ran migrate
command.
If you receive a "class not found" error when running migrations, try running the composer dump-autoload command and re-issuing the migrate command.