2014-06-11 2 views
0

나는 현재 내가 마이그레이션 명령을 실행하지만 때, 내 Mac에 위탁하여 Laravel을 설정하려고으로 마이그레이션을 사용하는 경우 : 나는 다음과 같은 오류가Laravel - 예상치 못한 "}}"위탁

php artisan entrust:migration 

를 :

{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"syntax error, unexpected '' }}' (T_CONSTANT_ENCAPSED_STRING)","file":"\/Users\/tom\/MAMP\/bosch-cal-admin\/admin\/app\/storage\/views\/06f59d153dac2acc0d27dd56fbb5b6e0","line":16}} 

잠재적 인 문제에 대한 정보 나는 내 터미널에서 잘못된 버전의 php를 실행하고있을 수 있다는 것을 발견했습니다.

내가 이것을 확인하고 내가 실행하고 : 지원

PHP 5.4.10 (cli) (built: Jan 21 2013 15:12:32) 
Copyright (c) 1997-2012 The PHP Group 
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies 
    with XCache v2.0.1, Copyright (c) 2005-2012, by mOo 

.

의견을 보내 주시면 감사하겠습니다.

업데이트 ----- 생성 된 코드

{{ '<?php' }} 

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

class EntrustSetupTables extends Migration { 

    /** 
    * Run the migrations. 
    * 
    * @return void 
    */ 
    public function up() 
    { 
     // Creates the roles table 
     Schema::create('roles', function($table) 
     { 
      $table->increments('id')->unsigned(); 
      $table->string('name')->unique(); 
      $table->timestamps(); 
     }); 

     // Creates the assigned_roles (Many-to-Many relation) table 
     Schema::create('assigned_roles', function($table) 
     { 
      $table->increments('id')->unsigned(); 
      $table->integer('user_id')->unsigned(); 
      $table->integer('role_id')->unsigned(); 
      $table->foreign('user_id')->references('id')->on('users'); // assumes a users table 
      $table->foreign('role_id')->references('id')->on('roles'); 
     }); 

     // Creates the permissions table 
     Schema::create('permissions', function($table) 
     { 
      $table->increments('id')->unsigned(); 
      $table->string('name'); 
      $table->string('display_name'); 
      $table->timestamps(); 
     }); 

     // Creates the permission_role (Many-to-Many relation) table 
     Schema::create('permission_role', function($table) 
     { 
      $table->increments('id')->unsigned(); 
      $table->integer('permission_id')->unsigned(); 
      $table->integer('role_id')->unsigned(); 
      $table->foreign('permission_id')->references('id')->on('permissions'); // assumes a users table 
      $table->foreign('role_id')->references('id')->on('roles'); 
     }); 
    } 

    /** 
    * Reverse the migrations. 
    * 
    * @return void 
    */ 
    public function down() 
    { 
     Schema::table('assigned_roles', function(Blueprint $table) { 
      $table->dropForeign('assigned_roles_user_id_foreign'); 
      $table->dropForeign('assigned_roles_role_id_foreign'); 
     }); 

     Schema::table('permission_role', function(Blueprint $table) { 
      $table->dropForeign('permission_role_permission_id_foreign'); 
      $table->dropForeign('permission_role_role_id_foreign'); 
     }); 

     Schema::drop('assigned_roles'); 
     Schema::drop('permission_role'); 
     Schema::drop('roles'); 
     Schema::drop('permissions'); 
    } 

} 
+0

두 가지 사용하여 첫 번째 응용 프로그램/저장/views''의 모든 캐시 된 뷰를 제거하고 다시 시도 할 때 Laravel 4.1로 롤백 시도, 개발자 다른 패키지는 비슷한 문제가 있습니다. 둘째, 오류가있는보기를 분리하고 질문에보기 코드를 넣으면이 문제를 올바르게 진단하는 데 도움이됩니다. –

+0

이미 이것을 시도했지만, 위임에 의해 생성 된 코드를 첨부합니다. –

+0

'{{ ' Razor

답변