2017-01-29 12 views
-1

私はここに新しいです、私は解決できない問題があります。私はlaravel 5.3で私のテーブルを移行する際にエラーが発生しました。

私はCOMANDと私のマイグレーションを作成していた。--create =テーブル

移行テーブルをしかし、私は、「PHPの職人の移行」に入力しないとき、私はこのエラー

[Symfony\Component\Debug\Exception\FatalErrorException] parse error

を持っている:PHPの職人メイクを

すべてのテーブルはこのようになります:

<?php 
use Illuminate\Support\Facades\Schema; 
use Illuminate\Database\Schema\Blueprint; 
use Illuminate\Database\Migrations\Migration; 

class CTEquiposMantenciones extends Migration 
{ 
    public function up() 
    { 
     Schema::create('equipos_mantenciones', function (Blueprint $table) { 
      $table->increments('id')->unique(); 
      $table->integer('equipos_id'); 
      $table->integer('matenciones_id'); 
     }); 
    } 
    public function down() 
    { 
     Schema::dropIfExists('equipos_mantenciones'); 
    } 
} 

答えて

0

これは、移行ファイルの1つに構文エラーがあることを意味します。

$ php artisan migrate 
PHP Parse error: syntax error, unexpected ''name'' (T_CONSTANT_ENCAPSED_STRING) in /home/hradecek/laravel/2014_10_12_000000_create_users_table.php on line 18 
PHP Stack trace: 
... 

これはパスで、特に一部を参照してください、あなたに何が悪かったのかヒントを与えるかもしれません:セミコロン、不適切な閉じ括弧、タイプミス等...実行した後

がありません、あなたはおそらくこの種のエラーを得ましたファイルと行番号。この具体例では

、 /home/hradecek/laravel/2014_10_12_000000_create_users_table.phpパス上のファイルにライン18に間違って何かがありました。

+0

ありがとう、それは問題だった、私はそれを見ていない –

+0

それを聞いてうれしい、解決策として答えをマークしてください:) –

関連する問題