Example of Blade components in christophrumpel/larastreamers

File app/View/Components/AddStreamsToCalendar.php (link to Github)
use 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');
File resources/views/components/add-streams-to-calendar.blade.php (link to Github)
<div class="relative z-0 inline-flex shadow-sm rounded-md" x-data="{ show: false }">
            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

Additional resources on blade components: