increments('id'); $table->string('name'); $table->integer('project_id')->unsigned(); $table->integer('user_id')->unsigned(); $table->unsignedInteger('company_id'); $table->integer('days'); $table->integer('hours')->unsigned(); $table->foreign('project_id')->references('id')->on('projects'); $table->foreign('company_id')->references('id')->on('companies'); $table->foreign('user_id')->references('id')->on('users'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('tasks'); } }