[{"data":1,"prerenderedAt":415},["ShallowReactive",2],{"navigation":3,"\u002Fdocs\u002Fv1\u002Fnativephp\u002Fsetup":121,"\u002Fdocs\u002Fv1\u002Fnativephp\u002Fsetup-surround":410},[4],{"title":5,"path":6,"stem":7,"children":8,"page":44},"Docs","\u002Fdocs","docs",[9],{"title":10,"path":11,"stem":12,"children":13,"page":44},"V1","\u002Fdocs\u002Fv1","docs\u002Fv1",[14,18,22,45,58,80,93,111],{"title":15,"path":16,"stem":17},"Introduction","\u002Fdocs\u002Fv1\u002Fintroduction","docs\u002Fv1\u002F0.introduction",{"title":19,"path":20,"stem":21},"How It Works","\u002Fdocs\u002Fv1\u002Fhow-it-works","docs\u002Fv1\u002F1.how-it-works",{"title":23,"icon":24,"path":25,"stem":26,"children":27,"page":44},"Client","i-lucide-laptop","\u002Fdocs\u002Fv1\u002Fclient","docs\u002Fv1\u002F2.client",[28,32,36,40],{"title":29,"path":30,"stem":31},"Client Setup","\u002Fdocs\u002Fv1\u002Fclient\u002Fsetup","docs\u002Fv1\u002F2.client\u002F1.setup",{"title":33,"path":34,"stem":35},"Syncing","\u002Fdocs\u002Fv1\u002Fclient\u002Fsyncing","docs\u002Fv1\u002F2.client\u002F2.syncing",{"title":37,"path":38,"stem":39},"Events","\u002Fdocs\u002Fv1\u002Fclient\u002Fevents","docs\u002Fv1\u002F2.client\u002F3.events",{"title":41,"path":42,"stem":43},"Configuration","\u002Fdocs\u002Fv1\u002Fclient\u002Fconfiguration","docs\u002Fv1\u002F2.client\u002F4.configuration",false,{"title":46,"icon":47,"path":48,"stem":49,"children":50,"page":44},"Server","i-lucide-server","\u002Fdocs\u002Fv1\u002Fserver","docs\u002Fv1\u002F3.server",[51,55],{"title":52,"path":53,"stem":54},"Server Setup","\u002Fdocs\u002Fv1\u002Fserver\u002Fsetup","docs\u002Fv1\u002F3.server\u002F1.setup",{"title":41,"path":56,"stem":57},"\u002Fdocs\u002Fv1\u002Fserver\u002Fconfiguration","docs\u002Fv1\u002F3.server\u002F2.configuration",{"title":59,"icon":60,"badge":61,"path":62,"stem":63,"children":64,"page":44},"NativePHP","i-lucide-smartphone","Commercial","\u002Fdocs\u002Fv1\u002Fnativephp","docs\u002Fv1\u002F4.nativephp",[65,69,73,76],{"title":66,"path":67,"stem":68},"Overview","\u002Fdocs\u002Fv1\u002Fnativephp\u002Foverview","docs\u002Fv1\u002F4.nativephp\u002F1.overview",{"title":70,"path":71,"stem":72},"Setup","\u002Fdocs\u002Fv1\u002Fnativephp\u002Fsetup","docs\u002Fv1\u002F4.nativephp\u002F2.setup",{"title":41,"path":74,"stem":75},"\u002Fdocs\u002Fv1\u002Fnativephp\u002Fconfiguration","docs\u002Fv1\u002F4.nativephp\u002F3.configuration",{"title":77,"path":78,"stem":79},"Lifecycle & Events","\u002Fdocs\u002Fv1\u002Fnativephp\u002Flifecycle","docs\u002Fv1\u002F4.nativephp\u002F4.lifecycle",{"title":81,"icon":82,"badge":61,"path":83,"stem":84,"children":85,"page":44},"Server Pro","i-lucide-bar-chart-2","\u002Fdocs\u002Fv1\u002Fserver-pro","docs\u002Fv1\u002F5.server-pro",[86,89],{"title":66,"path":87,"stem":88},"\u002Fdocs\u002Fv1\u002Fserver-pro\u002Foverview","docs\u002Fv1\u002F5.server-pro\u002F1.overview",{"title":90,"path":91,"stem":92},"Features","\u002Fdocs\u002Fv1\u002Fserver-pro\u002Ffeatures","docs\u002Fv1\u002F5.server-pro\u002F2.features",{"title":94,"icon":95,"path":96,"stem":97,"children":98,"page":44},"Advanced","i-lucide-settings-2","\u002Fdocs\u002Fv1\u002Fadvanced","docs\u002Fv1\u002F6.advanced",[99,103,107],{"title":100,"path":101,"stem":102},"Service Container","\u002Fdocs\u002Fv1\u002Fadvanced\u002Fservice-container","docs\u002Fv1\u002F6.advanced\u002F0.service-container",{"title":104,"path":105,"stem":106},"Conflict Resolution","\u002Fdocs\u002Fv1\u002Fadvanced\u002Fconflict-resolution","docs\u002Fv1\u002F6.advanced\u002F1.conflict-resolution",{"title":108,"path":109,"stem":110},"Payload Mapping","\u002Fdocs\u002Fv1\u002Fadvanced\u002Fpayload-mapping","docs\u002Fv1\u002F6.advanced\u002F2.payload-mapping",{"title":112,"icon":113,"path":114,"stem":115,"children":116,"page":44},"Examples","i-lucide-book-open","\u002Fdocs\u002Fv1\u002Fexamples","docs\u002Fv1\u002F7.examples",[117],{"title":118,"path":119,"stem":120},"Task Manager","\u002Fdocs\u002Fv1\u002Fexamples\u002Ftask-manager","docs\u002Fv1\u002F7.examples\u002F1.task-manager",{"id":122,"title":70,"body":123,"description":402,"extension":403,"links":404,"meta":405,"navigation":406,"path":71,"seo":407,"stem":72,"__hash__":409},"docs\u002Fdocs\u002Fv1\u002F4.nativephp\u002F2.setup.md",{"type":124,"value":125,"toc":395},"minimark",[126,135,138,143,154,165,167,171,223,226,228,232,238,268,271,273,277,280,349,352,367,369,373,376,384,391],[127,128,129,130,134],"p",{},"Set up NativePHP offline sync by installing the commercial ",[131,132,133],"code",{},"tether\u002Fnativephp-client"," add-on, registering the mobile plugin, and enabling automatic sync triggers for app resume, network restore, and background work.",[136,137],"hr",{},[139,140,142],"h2",{"id":141},"prerequisites","Prerequisites",[127,144,145,146,149,150,153],{},"Your NativePHP app must already have ",[131,147,148],{},"tether\u002Fclient"," configured and working. See the ",[151,152,29],"a",{"href":30}," guide first.",[127,155,156,157,159,160,164],{},"Because ",[131,158,133],{}," is a commercial package, configure Composer with your Tether repository credentials before installing it. Open ",[151,161,163],{"href":162},"\u002Fapp\u002Faccount","My account",", create a Composer token, then add the repository and HTTP basic credentials shown there.",[136,166],{},[139,168,170],{"id":169},"installation","Installation",[172,173,178],"pre",{"className":174,"code":175,"language":176,"meta":177,"style":177},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","composer require tether\u002Fnativephp-client\nphp artisan native:plugin:register tether\u002Fnativephp-client\nphp artisan vendor:publish --tag=tether-nativephp-config\n","bash","",[131,179,180,196,210],{"__ignoreMap":177},[181,182,185,189,193],"span",{"class":183,"line":184},"line",1,[181,186,188],{"class":187},"sBMFI","composer",[181,190,192],{"class":191},"sfazB"," require",[181,194,195],{"class":191}," tether\u002Fnativephp-client\n",[181,197,199,202,205,208],{"class":183,"line":198},2,[181,200,201],{"class":187},"php",[181,203,204],{"class":191}," artisan",[181,206,207],{"class":191}," native:plugin:register",[181,209,195],{"class":191},[181,211,213,215,217,220],{"class":183,"line":212},3,[181,214,201],{"class":187},[181,216,204],{"class":191},[181,218,219],{"class":191}," vendor:publish",[181,221,222],{"class":191}," --tag=tether-nativephp-config\n",[127,224,225],{},"The package registers its service provider automatically through Laravel package discovery.",[136,227],{},[139,229,231],{"id":230},"what-gets-registered","What gets registered",[127,233,234,237],{},[131,235,236],{},"TetherNativephpClientServiceProvider"," is auto-registered. It:",[239,240,241,249,256,262],"ol",{},[242,243,244,245,248],"li",{},"Merges the ",[131,246,247],{},"tether-nativephp"," config.",[242,250,251,252,255],{},"Registers the app-resume sync listener when ",[131,253,254],{},"auto_sync_on_resume = true",".",[242,257,258,259,255],{},"Registers the connectivity-restored sync listener when ",[131,260,261],{},"auto_sync_on_connectivity = true",[242,263,264,265,255],{},"Registers background sync scheduling when ",[131,266,267],{},"background_sync = true",[127,269,270],{},"All of this happens automatically. In a normal app, you install the package, publish the config, and adjust the config values you care about.",[136,272],{},[139,274,276],{"id":275},"basic-configuration","Basic configuration",[127,278,279],{},"After publishing the config, decide which sync triggers your app should use:",[172,281,284],{"className":282,"code":283,"language":201,"meta":177,"style":177},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","'auto_sync_on_resume' => true,\n'resume_cooldown' => 30,\n'auto_sync_on_connectivity' => true,\n'background_sync' => false,\n",[131,285,286,303,321,334],{"__ignoreMap":177},[181,287,288,292,295,297,300],{"class":183,"line":184},[181,289,291],{"class":290},"sMK4o","'",[181,293,294],{"class":191},"auto_sync_on_resume",[181,296,291],{"class":290},[181,298,299],{"class":290}," =>",[181,301,302],{"class":290}," true,\n",[181,304,305,307,310,312,314,318],{"class":183,"line":198},[181,306,291],{"class":290},[181,308,309],{"class":191},"resume_cooldown",[181,311,291],{"class":290},[181,313,299],{"class":290},[181,315,317],{"class":316},"sbssI"," 30",[181,319,320],{"class":290},",\n",[181,322,323,325,328,330,332],{"class":183,"line":212},[181,324,291],{"class":290},[181,326,327],{"class":191},"auto_sync_on_connectivity",[181,329,291],{"class":290},[181,331,299],{"class":290},[181,333,302],{"class":290},[181,335,337,339,342,344,346],{"class":183,"line":336},4,[181,338,291],{"class":290},[181,340,341],{"class":191},"background_sync",[181,343,291],{"class":290},[181,345,299],{"class":290},[181,347,348],{"class":290}," false,\n",[127,350,351],{},"Most apps can keep the defaults:",[353,354,355,358,361],"ul",{},[242,356,357],{},"Resume sync pushes local changes when the user opens the app again.",[242,359,360],{},"Connectivity sync pushes local changes once the device is back online.",[242,362,363,364,255],{},"Background sync is opt-in because it requires ",[131,365,366],{},"nativephp\u002Fmobile-background-tasks",[136,368],{},[139,370,372],{"id":371},"verifying-the-installation","Verifying the installation",[127,374,375],{},"After installing, run your NativePHP app and verify the Laravel log or queue output when you:",[239,377,378,381],{},[242,379,380],{},"Send the app to the background and open it again.",[242,382,383],{},"Disconnect and reconnect the device's network.",[127,385,386,387,390],{},"In both cases, the package should dispatch ",[131,388,389],{},"PushJob"," when the corresponding trigger is enabled.",[392,393,394],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}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 .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":177,"searchDepth":184,"depth":198,"links":396},[397,398,399,400,401],{"id":141,"depth":198,"text":142},{"id":169,"depth":198,"text":170},{"id":230,"depth":198,"text":231},{"id":275,"depth":198,"text":276},{"id":371,"depth":198,"text":372},"Install tether\u002Fnativephp-client, register the NativePHP mobile plugin, configure Composer access, and enable automatic sync in a NativePHP app.","md",null,{"badge":61},true,{"title":408,"description":402},"Set Up NativePHP Offline Sync with Laravel Tether","v3ai94uDS83-uYMIRLOw81n-OYyeG3W_vlEf1Brn11s",[411,413],{"title":66,"path":67,"stem":68,"description":412,"children":-1},"See how tether\u002Fnativephp-client adds automatic offline sync triggers for NativePHP mobile apps on app resume, network restore, and background tasks.",{"title":41,"path":74,"stem":75,"description":414,"children":-1},"Configure NativePHP offline sync triggers for app resume, connectivity restore, background scheduling, cooldowns, and network constraints.",1780481014281]