1 line
18 KiB
JSON
1 line
18 KiB
JSON
[{"data":1,"prerenderedAt":799},["ShallowReactive",2],{"navigation_docs":3,"-essentials-notifications":75,"-essentials-notifications-surround":794},[4,20,60],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15],{"title":11,"path":12,"stem":13,"icon":14},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F1.installation","i-lucide-download",{"title":16,"path":17,"stem":18,"icon":19},"Upgrading","\u002Fgetting-started\u002Fupgrading","1.getting-started\u002F2.upgrading","i-lucide-arrow-up-circle",{"title":21,"path":22,"stem":23,"children":24,"page":6},"Essentials","\u002Fessentials","2.essentials",[25,30,35,40,45,50,55],{"title":26,"path":27,"stem":28,"icon":29},"Configuration","\u002Fessentials\u002Fconfiguration","2.essentials\u002F1.configuration","i-lucide-settings",{"title":31,"path":32,"stem":33,"icon":34},"Authorization","\u002Fessentials\u002Fauthorization","2.essentials\u002F2.authorization","i-lucide-shield",{"title":36,"path":37,"stem":38,"icon":39},"Mentions","\u002Fessentials\u002Fmentions","2.essentials\u002F3.mentions","i-lucide-at-sign",{"title":41,"path":42,"stem":43,"icon":44},"Reactions","\u002Fessentials\u002Freactions","2.essentials\u002F4.reactions","i-lucide-smile",{"title":46,"path":47,"stem":48,"icon":49},"Attachments","\u002Fessentials\u002Fattachments","2.essentials\u002F5.attachments","i-lucide-paperclip",{"title":51,"path":52,"stem":53,"icon":54},"Notifications","\u002Fessentials\u002Fnotifications","2.essentials\u002F6.notifications","i-lucide-bell",{"title":56,"path":57,"stem":58,"icon":59},"Database Schema","\u002Fessentials\u002Fdatabase-schema","2.essentials\u002F7.database-schema","i-lucide-database",{"title":61,"path":62,"stem":63,"children":64,"page":6},"Community","\u002Fcommunity","4.community",[65,70],{"title":66,"path":67,"stem":68,"icon":69},"Contributing","\u002Fcommunity\u002Fcontributing","4.community\u002F1.contributing","i-lucide-heart-handshake",{"title":71,"path":72,"stem":73,"icon":74},"License","\u002Fcommunity\u002Flicense","4.community\u002F2.license","i-lucide-scale",{"id":76,"title":51,"body":77,"description":786,"extension":787,"links":788,"meta":789,"navigation":790,"path":52,"seo":791,"stem":53,"__hash__":793},"docs\u002F2.essentials\u002F6.notifications.md",{"type":78,"value":79,"toc":768},"minimark",[80,85,89,94,97,101,104,108,191,202,266,270,273,277,311,314,324,328,331,335,500,504,589,593,597,600,658,664,667,671,674,716,723,727,761,764],[81,82,84],"h2",{"id":83},"notification-types","Notification Types",[86,87,88],"p",{},"Two notification classes are included:",[90,91,93],"h3",{"id":92},"commentrepliednotification","CommentRepliedNotification",[86,95,96],{},"Sent to all thread subscribers when a new comment or reply is posted. The comment author is excluded from receiving their own notification.",[90,98,100],{"id":99},"usermentionednotification","UserMentionedNotification",[86,102,103],{},"Sent to a user when they are @mentioned in a comment. Self-mentions are ignored.",[81,105,107],{"id":106},"channels","Channels",[109,110,115],"pre",{"className":111,"code":112,"language":113,"meta":114,"style":114},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F config\u002Fcomments.php\n'notifications' => [\n 'channels' => ['database'],\n 'enabled' => true,\n],\n","php","",[116,117,118,127,146,171,186],"code",{"__ignoreMap":114},[119,120,123],"span",{"class":121,"line":122},"line",1,[119,124,126],{"class":125},"sHwdD","\u002F\u002F config\u002Fcomments.php\n",[119,128,130,134,138,140,143],{"class":121,"line":129},2,[119,131,133],{"class":132},"sMK4o","'",[119,135,137],{"class":136},"sfazB","notifications",[119,139,133],{"class":132},[119,141,142],{"class":132}," =>",[119,144,145],{"class":132}," [\n",[119,147,149,152,154,156,158,161,163,166,168],{"class":121,"line":148},3,[119,150,151],{"class":132}," '",[119,153,106],{"class":136},[119,155,133],{"class":132},[119,157,142],{"class":132},[119,159,160],{"class":132}," [",[119,162,133],{"class":132},[119,164,165],{"class":136},"database",[119,167,133],{"class":132},[119,169,170],{"class":132},"],\n",[119,172,174,176,179,181,183],{"class":121,"line":173},4,[119,175,151],{"class":132},[119,177,178],{"class":136},"enabled",[119,180,133],{"class":132},[119,182,142],{"class":132},[119,184,185],{"class":132}," true,\n",[119,187,189],{"class":121,"line":188},5,[119,190,170],{"class":132},[86,192,193,194,197,198,201],{},"Available channels: ",[116,195,196],{},"'database'"," and ",[116,199,200],{},"'mail'",". Add both to send email notifications alongside database notifications:",[109,203,205],{"className":111,"code":204,"language":113,"meta":114,"style":114},"'notifications' => [\n 'channels' => ['database', 'mail'],\n 'enabled' => true,\n],\n",[116,206,207,219,250,262],{"__ignoreMap":114},[119,208,209,211,213,215,217],{"class":121,"line":122},[119,210,133],{"class":132},[119,212,137],{"class":136},[119,214,133],{"class":132},[119,216,142],{"class":132},[119,218,145],{"class":132},[119,220,221,223,225,227,229,231,233,235,237,240,243,246,248],{"class":121,"line":129},[119,222,151],{"class":132},[119,224,106],{"class":136},[119,226,133],{"class":132},[119,228,142],{"class":132},[119,230,160],{"class":132},[119,232,133],{"class":132},[119,234,165],{"class":136},[119,236,133],{"class":132},[119,238,239],{"class":132},",",[119,241,242],{"class":132}," '",[119,244,245],{"class":136},"mail",[119,247,133],{"class":132},[119,249,170],{"class":132},[119,251,252,254,256,258,260],{"class":121,"line":148},[119,253,151],{"class":132},[119,255,178],{"class":136},[119,257,133],{"class":132},[119,259,142],{"class":132},[119,261,185],{"class":132},[119,263,264],{"class":121,"line":173},[119,265,170],{"class":132},[81,267,269],{"id":268},"subscriptions","Subscriptions",[86,271,272],{},"Users can subscribe to comment threads on any commentable model. Subscribers receive notifications when new comments are posted.",[90,274,276],{"id":275},"auto-subscribe","Auto-Subscribe",[109,278,280],{"className":111,"code":279,"language":113,"meta":114,"style":114},"'subscriptions' => [\n 'auto_subscribe' => true,\n],\n",[116,281,282,294,307],{"__ignoreMap":114},[119,283,284,286,288,290,292],{"class":121,"line":122},[119,285,133],{"class":132},[119,287,268],{"class":136},[119,289,133],{"class":132},[119,291,142],{"class":132},[119,293,145],{"class":132},[119,295,296,298,301,303,305],{"class":121,"line":129},[119,297,151],{"class":132},[119,299,300],{"class":136},"auto_subscribe",[119,302,133],{"class":132},[119,304,142],{"class":132},[119,306,185],{"class":132},[119,308,309],{"class":121,"line":148},[119,310,170],{"class":132},[86,312,313],{},"When enabled:",[315,316,317,321],"ul",{},[318,319,320],"li",{},"Users are auto-subscribed when they post a comment",[318,322,323],{},"Users are auto-subscribed when they are @mentioned",[90,325,327],{"id":326},"manual-subscription","Manual Subscription",[86,329,330],{},"Users can toggle their subscription using the subscribe\u002Funsubscribe button in the comments UI.",[90,332,334],{"id":333},"programmatic-access","Programmatic Access",[109,336,338],{"className":111,"code":337,"language":113,"meta":114,"style":114},"use Relaticle\\Comments\\Models\\Subscription;\n\n\u002F\u002F Check subscription status\nSubscription::isSubscribed($commentable, $user);\n\n\u002F\u002F Subscribe\u002Funsubscribe\nSubscription::subscribe($commentable, $user);\nSubscription::unsubscribe($commentable, $user);\n\n\u002F\u002F Get all subscribers for a commentable\n$subscribers = Subscription::subscribersFor($commentable);\n",[116,339,340,369,375,380,409,413,419,441,463,468,474],{"__ignoreMap":114},[119,341,342,346,350,353,356,358,361,363,366],{"class":121,"line":122},[119,343,345],{"class":344},"sbssI","use",[119,347,349],{"class":348},"sTEyZ"," Relaticle",[119,351,352],{"class":132},"\\",[119,354,355],{"class":348},"Comments",[119,357,352],{"class":132},[119,359,360],{"class":348},"Models",[119,362,352],{"class":132},[119,364,365],{"class":348},"Subscription",[119,367,368],{"class":132},";\n",[119,370,371],{"class":121,"line":129},[119,372,374],{"emptyLinePlaceholder":373},true,"\n",[119,376,377],{"class":121,"line":148},[119,378,379],{"class":125},"\u002F\u002F Check subscription status\n",[119,381,382,385,388,392,395,398,400,403,406],{"class":121,"line":173},[119,383,365],{"class":384},"sBMFI",[119,386,387],{"class":132},"::",[119,389,391],{"class":390},"s2Zo4","isSubscribed",[119,393,394],{"class":132},"($",[119,396,397],{"class":348},"commentable",[119,399,239],{"class":132},[119,401,402],{"class":132}," $",[119,404,405],{"class":348},"user",[119,407,408],{"class":132},");\n",[119,410,411],{"class":121,"line":188},[119,412,374],{"emptyLinePlaceholder":373},[119,414,416],{"class":121,"line":415},6,[119,417,418],{"class":125},"\u002F\u002F Subscribe\u002Funsubscribe\n",[119,420,422,424,426,429,431,433,435,437,439],{"class":121,"line":421},7,[119,423,365],{"class":384},[119,425,387],{"class":132},[119,427,428],{"class":390},"subscribe",[119,430,394],{"class":132},[119,432,397],{"class":348},[119,434,239],{"class":132},[119,436,402],{"class":132},[119,438,405],{"class":348},[119,440,408],{"class":132},[119,442,444,446,448,451,453,455,457,459,461],{"class":121,"line":443},8,[119,445,365],{"class":384},[119,447,387],{"class":132},[119,449,450],{"class":390},"unsubscribe",[119,452,394],{"class":132},[119,454,397],{"class":348},[119,456,239],{"class":132},[119,458,402],{"class":132},[119,460,405],{"class":348},[119,462,408],{"class":132},[119,464,466],{"class":121,"line":465},9,[119,467,374],{"emptyLinePlaceholder":373},[119,469,471],{"class":121,"line":470},10,[119,472,473],{"class":125},"\u002F\u002F Get all subscribers for a commentable\n",[119,475,477,480,483,486,489,491,494,496,498],{"class":121,"line":476},11,[119,478,479],{"class":132},"$",[119,481,482],{"class":348},"subscribers ",[119,484,485],{"class":132},"=",[119,487,488],{"class":384}," Subscription",[119,490,387],{"class":132},[119,492,493],{"class":390},"subscribersFor",[119,495,394],{"class":132},[119,497,397],{"class":348},[119,499,408],{"class":132},[81,501,503],{"id":502},"events","Events",[505,506,507,523],"table",{},[508,509,510],"thead",{},[511,512,513,517,520],"tr",{},[514,515,516],"th",{},"Event",[514,518,519],{},"Trigger",[514,521,522],{},"Broadcasts",[524,525,526,540,552,564,576],"tbody",{},[511,527,528,534,537],{},[529,530,531],"td",{},[116,532,533],{},"CommentCreated",[529,535,536],{},"New comment or reply",[529,538,539],{},"Yes",[511,541,542,547,550],{},[529,543,544],{},[116,545,546],{},"CommentUpdated",[529,548,549],{},"Comment edited",[529,551,539],{},[511,553,554,559,562],{},[529,555,556],{},[116,557,558],{},"CommentDeleted",[529,560,561],{},"Comment soft-deleted",[529,563,539],{},[511,565,566,571,574],{},[529,567,568],{},[116,569,570],{},"CommentReacted",[529,572,573],{},"Reaction added\u002Fremoved",[529,575,539],{},[511,577,578,583,586],{},[529,579,580],{},[116,581,582],{},"UserMentioned",[529,584,585],{},"User @mentioned",[529,587,588],{},"No",[81,590,592],{"id":591},"real-time-updates","Real-time Updates",[90,594,596],{"id":595},"broadcasting","Broadcasting",[86,598,599],{},"Enable broadcasting for instant updates across browser sessions:",[109,601,603],{"className":111,"code":602,"language":113,"meta":114,"style":114},"\u002F\u002F config\u002Fcomments.php\n'broadcasting' => [\n 'enabled' => true,\n 'channel_prefix' => 'comments',\n],\n",[116,604,605,609,621,633,654],{"__ignoreMap":114},[119,606,607],{"class":121,"line":122},[119,608,126],{"class":125},[119,610,611,613,615,617,619],{"class":121,"line":129},[119,612,133],{"class":132},[119,614,595],{"class":136},[119,616,133],{"class":132},[119,618,142],{"class":132},[119,620,145],{"class":132},[119,622,623,625,627,629,631],{"class":121,"line":148},[119,624,151],{"class":132},[119,626,178],{"class":136},[119,628,133],{"class":132},[119,630,142],{"class":132},[119,632,185],{"class":132},[119,634,635,637,640,642,644,646,649,651],{"class":121,"line":173},[119,636,151],{"class":132},[119,638,639],{"class":136},"channel_prefix",[119,641,133],{"class":132},[119,643,142],{"class":132},[119,645,242],{"class":132},[119,647,648],{"class":136},"comments",[119,650,133],{"class":132},[119,652,653],{"class":132},",\n",[119,655,656],{"class":121,"line":188},[119,657,170],{"class":132},[86,659,660,661],{},"Events are broadcast on private channels: ",[116,662,663],{},"{prefix}.{commentable_type}.{commentable_id}",[86,665,666],{},"This requires Laravel Echo and a broadcasting driver (Pusher, Ably, etc.) configured in your application.",[90,668,670],{"id":669},"polling-fallback","Polling Fallback",[86,672,673],{},"When broadcasting is disabled, the Livewire component polls for updates:",[109,675,677],{"className":111,"code":676,"language":113,"meta":114,"style":114},"'polling' => [\n 'interval' => '10s',\n],\n",[116,678,679,692,712],{"__ignoreMap":114},[119,680,681,683,686,688,690],{"class":121,"line":122},[119,682,133],{"class":132},[119,684,685],{"class":136},"polling",[119,687,133],{"class":132},[119,689,142],{"class":132},[119,691,145],{"class":132},[119,693,694,696,699,701,703,705,708,710],{"class":121,"line":129},[119,695,151],{"class":132},[119,697,698],{"class":136},"interval",[119,700,133],{"class":132},[119,702,142],{"class":132},[119,704,242],{"class":132},[119,706,707],{"class":136},"10s",[119,709,133],{"class":132},[119,711,653],{"class":132},[119,713,714],{"class":121,"line":148},[119,715,170],{"class":132},[86,717,718,719,722],{},"Set to ",[116,720,721],{},"null"," to disable polling entirely.",[81,724,726],{"id":725},"disabling-notifications","Disabling Notifications",[109,728,730],{"className":111,"code":729,"language":113,"meta":114,"style":114},"'notifications' => [\n 'enabled' => false,\n],\n",[116,731,732,744,757],{"__ignoreMap":114},[119,733,734,736,738,740,742],{"class":121,"line":122},[119,735,133],{"class":132},[119,737,137],{"class":136},[119,739,133],{"class":132},[119,741,142],{"class":132},[119,743,145],{"class":132},[119,745,746,748,750,752,754],{"class":121,"line":129},[119,747,151],{"class":132},[119,749,178],{"class":136},[119,751,133],{"class":132},[119,753,142],{"class":132},[119,755,756],{"class":132}," false,\n",[119,758,759],{"class":121,"line":148},[119,760,170],{"class":132},[86,762,763],{},"This disables all notification dispatching. Subscriptions and events still work, but no notifications are sent.",[765,766,767],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}",{"title":114,"searchDepth":129,"depth":129,"links":769},[770,774,775,780,781,785],{"id":83,"depth":129,"text":84,"children":771},[772,773],{"id":92,"depth":148,"text":93},{"id":99,"depth":148,"text":100},{"id":106,"depth":129,"text":107},{"id":268,"depth":129,"text":269,"children":776},[777,778,779],{"id":275,"depth":148,"text":276},{"id":326,"depth":148,"text":327},{"id":333,"depth":148,"text":334},{"id":502,"depth":129,"text":503},{"id":591,"depth":129,"text":592,"children":782},[783,784],{"id":595,"depth":148,"text":596},{"id":669,"depth":148,"text":670},{"id":725,"depth":129,"text":726},"Comment notifications, subscriptions, and real-time updates.","md",null,{},{"icon":54},{"description":792,"title":51},"Configure comment notifications, subscriptions, broadcasting, and polling.","drotOcQFMBQs0KXJ02mt95uFAuJkVVeqmKiZga1ki1c",[795,797],{"title":46,"path":47,"stem":48,"description":796,"icon":49,"children":-1},"File uploads for comments.",{"title":56,"path":57,"stem":58,"description":798,"icon":59,"children":-1},"Tables, relationships, and indexes used by the Comments package.",1774613361671] |