Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 4 migration: class not found exception

So apparently now I get this weird error when I want to migrate my database

{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class '' not found","file":"C:\\xampp\\htdocs\\l4crm\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Migrations\\Migrator.php","line":301}}[Finished in 1.3s]

Everything used to work of course and it doesn't matter which files I try to migrate (I tried only migrating one table, then another, they all give the same error)

Any ideas? I have been staring myself blind at this for over an hour now.

Also "composer dump-autoload" does not do the trick.

My composer.json autoloads the migrations also.

like image 545
KennyV Avatar asked Nov 29 '22 02:11

KennyV


1 Answers

I had the same problem, I searched the internet and I found this solution that you should update your auto-generated classmap (aka autoload) with this composer command:

php composer.phar update

or

composer update    

check this link : I found the solution here

like image 178
Amin Behravesh Avatar answered Dec 16 '22 08:12

Amin Behravesh