-
app/View/Components/AddStreamsToCalendar.php
Open in GitHubuse Illuminate\View\Component; class AddStreamsToCalendar extends Component { public string $webcalLink; public function __construct() { $url = parse_url(route('calendar.ics')); $webcalLink = "webcal://{$url['host']}{$url['path']}"; $this->webcalLink = $webcalLink; } public function render() { return view('components.add-streams-to-calendar'); } }
-
resources/views/components/add-streams-to-calendar.blade.php
Open in GitHub<div class="relative z-0 inline-flex shadow-sm rounded-md" x-data="{ show: false }"> <a href="{{ $webcalLink }}" class="relative flex items-center px-3 py-2 text-sm font-medium text-white transition bg-red-600 rounded-md rounded-r-none shadow hover:bg-red-500 focus:bg-red-700 focus:outline-none focus:ring focus:ring-red-400" > Add streams to calendar </a> // </div>