Ahora si(?

This commit is contained in:
Laucha1312
2026-06-04 15:01:53 -03:00
parent 47408d49fc
commit 8fc619f9e7
127 changed files with 12952 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class PushSubscription extends Model
{
protected $fillable = [
'id_usuario',
'tipo_usuario',
'endpoint',
'p256dh',
'auth',
];
/**
* Relación polimórfica manual (ya que no usamos el User estándar de Laravel siempre)
*/
public function scopeParaUsuario($query, $tipo, $id)
{
return $query->where('tipo_usuario', $tipo)->where('id_usuario', $id);
}
}