34 lines
610 B
PHP
Executable File
34 lines
610 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Notificacion extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'notificaciones';
|
|
|
|
protected $fillable = [
|
|
'remitente_id',
|
|
'destinatario_id',
|
|
'titulo',
|
|
'descripcion',
|
|
'estado',
|
|
'todos',
|
|
];
|
|
|
|
public function remitente()
|
|
{
|
|
return $this->belongsTo(User::class, 'remitente_id');
|
|
}
|
|
|
|
public function destinatario()
|
|
{
|
|
return $this->belongsTo(User::class, 'destinatario_id');
|
|
}
|
|
}
|
|
|