A
A
Alexey Romanov2017-04-30 19:20:01
Laravel
Alexey Romanov, 2017-04-30 19:20:01

Why is the migration not working in Laravel?

Good day!
Please tell me what is wrong.
Created a migration file via
php artisan make:migrate create_articles_table
Filled out the file:

<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateArticleTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('articles', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title');
            $table->text('description');
            $table->text('article_text');
            $table->timestamps();
        });
    }

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

When executing the command php artisan migrate <path to the migration file>
an error occurs
[Symfony\Component\Console\Exception\RuntimeException]
  Too many arguments, expected arguments "command".

I use MAMP on macos.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andy Developer, 2017-04-30
@romalex

php artisan migrate is all you need
, it also says "too many arguments"
or so, php artisan migrate --path=/database/migrations/selected/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question