Laravel 4 migrations - class not found Laravel 4 migrations - class not found laravel laravel

Laravel 4 migrations - class not found


I had this error on xubuntu and fixed it with sudo composer dump-autoload


In Laravel 4 (illuminate) migration class do not require you to set unsigned method. You can try this.

  class CreateBlogsTable extends Migration{    /**     * Run the migrations.     *     * @return void     */    public function up()    {        Schema::create('blogs', function($table)        {            $table->increments('id');            $table->string('title');            $table->text('description')->nullable();            $table->integer('user_id');            $table->timestamps();        });    }    /**     * Reverse the migrations.     *     * @return void     */    public function down()    {        Schema::drop('blogs');    }}

After having the chat with you, I knew two problems, one is that already mentioned above and the other problem is due to the class not been registered into composer autoload. You will have to run manually : php composer.phar dump-autoload


Artisan do the same work:

php artisan dump-autoload

Just a reminder for those who are not familiar with composer.