This question already has an answer here:
I have created migration file in that i have written :
- public function up()
- {
- //
- Schema::create('ad_group', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('campaign_id')->unsigned();
- $table->char('name',32);
- });
- Schema::table('ad_group',function (Blueprint $table){
- $table->foreign('campaign_id')->references->('id')->on('campaigns');
- });
- }
which returns error like this :
[Symfony\Component\Debug\Exception\FatalThrowableError]
Parse error: syntax error, unexpected '(', expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'
</div>