This commit is contained in:
28
api/app/Models/Cadastro/SujeitoAtencao/FatorRisco.php
Normal file
28
api/app/Models/Cadastro/SujeitoAtencao/FatorRisco.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Cadastro\SujeitoAtencao;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class FatorRisco extends Model
|
||||
{
|
||||
protected $table = 'cadastro_fator_risco';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'nome',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'pivot'
|
||||
];
|
||||
|
||||
public function cidadaos()
|
||||
{
|
||||
return $this->belongsToMany(Cidadao::class, 'cadastro_cidadao_fator_risco')
|
||||
->using(CidadaoFatorRisco::class)
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user