Commit be29a9dc authored by Guilherme Silva's avatar Guilherme Silva
Browse files

Retirada de tabela de documentação complementar

parent b5365fd8
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class DocumentacaoComplementar extends Model
{
protected $fillable = [
'termoCompromisso',
'comprovanteMatricula',
'linkLattes',
'pdfLattes',
'participante_id',
];
public function participante(){
return $this->belongsTo(Participante::class, 'participante_id', 'id');
}
}
...@@ -34,7 +34,4 @@ class Participante extends Model ...@@ -34,7 +34,4 @@ class Participante extends Model
return $this->hasOne('App\Arquivo', 'participanteId'); return $this->hasOne('App\Arquivo', 'participanteId');
} }
public function documentacaoComplementar() {
return $this->hasOne('App\DocumentacaoComplementar', 'participante_id');
}
} }
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDocumentacaoComplementarsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('documentacao_complementars', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('termoCompromisso')->nullable();
$table->string('comprovanteMatricula')->nullable();
$table->string('pdfLattes')->nullable();
$table->string('linkLattes')->nullable();
$table->integer('participante_id')->nullable();
$table->foreign('participante_id')->references('id')->on('participantes');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('documentacao_complementars');
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment