tokens()?->first(); if ($token === null) { $token = Auth::user()->createToken('api-token', ['update-screen']); } $this->token = $token->plainTextToken; $this->devices = auth()->user()->devices?->pluck('id', 'name'); $this->selected_device = $this->devices->first(); } public function regenerateToken() { Auth::user()->tokens()?->first()?->delete(); $token = Auth::user()->createToken('api-token', ['update-screen']); $this->token = $token->plainTextToken; } }; ?>
{"markup":"<h1>Hello World</h1>"}
{"default_refresh_interval": 900, "sleep_mode_enabled": true, "pause_until": "2025-07-10T22:00:00+02:00"}