| Total Complexity | 5 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class NotificationListener extends Component |
||
| 8 | { |
||
| 9 | public bool $showNewNotificationBadge = false; |
||
| 10 | |||
| 11 | public int $count = 88; |
||
| 12 | |||
| 13 | public $user; |
||
| 14 | |||
| 15 | // Computed Property |
||
| 16 | public function getCountProperty() |
||
| 17 | { |
||
| 18 | dump('getCountProperty()'); |
||
| 19 | return 999; //$this->user->unreadNotifications()->count(); |
||
| 20 | } |
||
| 21 | |||
| 22 | public function mount($user) |
||
| 23 | { |
||
| 24 | dump('mount:$user'); |
||
| 25 | $this->user = $user; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function getListeners() |
||
| 32 | ]; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function showNewNotificationBadge() |
||
| 36 | { |
||
| 37 | dump('showNewNotificationBadge()'); |
||
| 38 | $this->showNewNotificationBadge = true; |
||
| 39 | $this->count = 999; //$this->user->unreadNotifications()->count(); |
||
| 40 | } |
||
| 41 | |||
| 42 | public function render() |
||
| 45 | } |
||
| 46 | } |
||
| 47 |