nodes(); }); LaravelSabre::plugins(fn () => $this->plugins()); LaravelSabre::auth(function () { auth()->onceBasic(); return true; }); } /** * List of nodes for DAV Collection. * * @return array */ private function nodes(): array { $principalBackend = new Principal(); $addressBookBackend = new AddressBookBackend(); $calendarBackend = new CalendarBackend(); return [ new PrincipalCollection($principalBackend), new AddressBookRoot($principalBackend, $addressBookBackend), new CalendarRoot($principalBackend, $calendarBackend), ]; } private function plugins(): array { $authBackend = new AuthBackend(); return [ new BrowserPlugin(), new AuthPlugin($authBackend), new CardDAVPlugin(), new CalDAVPlugin(), new AclPlugin(), ]; } }