jeudi 27 avril 2017

Want to add Coloumn but Migration Class Not Found Even It exist

I am learning Laravel.

Here is my migration file code.

class CreatePostTable extends Migration
{
/**
 * Run the migrations.
 *
 * @return void
 */
public function up()
{
    Schema::create('post', function (Blueprint $table) {
        $table->increments('id');
        $table->integer('user_id')->unsigned(); // i want to add this column after adding this line i runs the command refresh but it shows below errors.
        $table->string('title');
        $table->text('body');
        $table->timestamps();
    });
}

/**
 * Reverse the migrations.
 *
 * @return void
 */
public function down()
{
    Schema::drop('post');
}
}

Now i have a problem that Whenever i runs this command in terminal in PHP STORM

php artisan migrate:refresh

it shows following errors.

PHP Fatal error: Class 'AddIsAdminColumnToPostTable' not found in C:\xampp\htdocs\cms\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php on line 335

and following error also

Symfony\Component\Debug\Exception\FatalErrorException] Class 'AddIsAdminColumnToPostTable' not found

I tried composer dump-autoload in terminal solution from here but not working. I also used rollback command but still having issue.

How can make refresh this?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2oAwnKZ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire