I'm using Laravel, and I'm trying to migrate some tables to my DB(phpmyadmin). It was giving me some trouble before, so I eliminated all the rows in the migration table in the DB, so now it has nothing. So I try to run 'php artisan migrate' and I get the following error:
PHP Fatal error: Class 'Table' not found in /var/www/loja/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php on line 301 {"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"Class 'Table' not found","file":"/var/www/loja/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php","line":301}}
I don't have any table or class named 'Table'. Anyone know what's wrong?
I already solved this. I discovered that migration files follow a certain format. For example, I had my files like this: 001_create_user_admin_table.php
And I discovered that the format has to be yyyy_mm_dd_hhmmss_name_of_file.php It has to have those first four arguments, that's why up top it said I couldn't find a Class 'table', because the way I had it before, table was my 5th argument in the file name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With