php artisan migrate class not found I have a migration file, with "class CreateUsersTable", but php artisan migrate gives me "class not found".
And composer dump-autoload does not help.
I also tried adding a classmap for migration in composer.json :
"autoload": {
"classmap": [
"database/seeds",
"database/factories",
"database/migrations"
],
Does not help either.
File is "2019_10_12_154406_create_users_table.php"
what do the lumen doc state? I know lumen has some of the laravel functionality stripped off to make it lightweight/faster etc..
also if you have phpstorm or a good editor try fining Migrate classes (or just browsing via vendor/ folder to see if you actually have them).
whats the full error message?
No, php artisan migrate is supposed to work with lumen too.
Full error :
In Migrator.php line 448:
Class 'CreateUsersTable' not found
Because there it cannot instantiate the class.
Any chance there is a syntax error in the file? That would make php unable to read the file (eg missing ; )
No syntax errors. Even if empty :
vagrant@homestead:~/codecourse/buildpodcastapp$ php artisan migrate
<?php;
class CreateUsersTable
{
}
In Migrator.php line 448:
Class 'CreateUsersTable' not found
Some issue with case sensitivity?
oh... I now have now error starting from the beginning, must be a silly mistake... I'll post back
Ok, sorry guys. Stupidest mistake ever. <?php;.
Komodo IDE didn't point that out.
Thanks
Please remember to mark best answer in case others are looking for the same issue 😊
Look for class name 2019_10_12_154406_create_users_table.php file to ensure that its name is CreateUsersTable
Please sign in or create an account to participate in this conversation.