# NotificationUser Model
| DB Table Name | {wp_db_prefix}_fbs_NotificationUsers |
|---|---|
| Schema | Check Schema |
| Source File | fluent-boards/app/Models/NotificationUser.php |
| Name Space | FluentBoards\App\Models |
| Class | FluentBoards\App\Models\NotificationUser |
# Attributes
| Attribute | Data Type | Comment |
|---|---|---|
| id | INT UNSIGNED Auto Increment | Primary key of the record |
| notification_id | INT UNSIGNED NULL | ID of the related notification |
| user_id | BIGINT UNSIGNED | ID of the user who received the notification |
| marked_read_at | TIMESTAMP NULL | Timestamp when the notification was marked as read |
| created_at | TIMESTAMP NULL | Timestamp when the record was created |
| updated_at | TIMESTAMP NULL | Timestamp when the record was last updated |
# Usage
Please check Model Basic for Common methods.
# Accessing Attributes
$notificationUser = FluentBoards\App\Models\NotificationUser::find(1);
$notificationUser->id; // returns id
$notificationUser->user_id; // returns user_id
.......
1
2
3
4
5
2
3
4
5
# Relations
This model has the following relationships that you can use
# notification
Access the associated notification
- return
FluentNotificationUsers\App\Models\NotificationModel Collection
# Example:
$notification = $notificationUser->notification;
1