| 1234567891011121314151617181920212223242526272829 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- class NotificationSend extends Model
- {
- protected $guarded = ['id'];
- protected function casts(): array
- {
- return [
- 'read' => 'boolean',
- 'read_at' => 'datetime',
- ];
- }
- public function notification(): BelongsTo
- {
- return $this->belongsTo(Notification::class);
- }
- public function user(): BelongsTo
- {
- return $this->belongsTo(User::class);
- }
- }
|