| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\SoftDeletes;
- class Notification extends Model
- {
- use HasFactory, SoftDeletes;
- protected $fillable = [
- 'title',
- 'description',
- 'origin',
- 'origin_id',
- 'type',
- 'read',
- 'read_at',
- 'user_id',
- ];
- protected $casts = [
- 'read' => 'boolean',
- 'read_at' => 'datetime',
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- ];
- public function user()
- {
- return $this->belongsTo(User::class);
- }
- }
|