@vincent15000 thanks for your reply
i already try this, not working
compA.php
$this->dispatch('requested-Notify-Triggered');
compB.php
protected $listeners = ['requested-Notify-Triggered' => '$refresh'];
public function PendingItemsNotify()
{
$this->notMarkedNotifications = DB::table('item_request_notifications')->where('notification_status', 'not marked')->count();
}
idk, its not working
let me explain my problem with scenario
when user click request btn, that function store as notification (compA)
$catchNotify = ItemRequestNotification::create([
'user_email' => Auth::user()->user_email,
'user_name' => Auth::user()->user_name,
'pending_items' => $numberOfRequestedItems,
'notification_message' => 'New Items pending for Approvals',
'notification_type' => 'Pending for Approvals Notification',
]);
in compB i fetching the notifications
public function PendingItemsNotify()
{
$this->notMarkedNotifications = DB::table('item_request_notifications')->where('notification_status', 'not marked')->count();
}
public function render()
{
$this->PendingItemsNotify();}
at the same time this is want to update
like, facebook. if someone send like or cmnt our post, at the same time we gotta notification.
and one more thing, wire:poll also i try to do that, but that thing affect my js and other livewire functions
any other solutions?