Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

christophrumpel/larastreamers

238 stars
2 code files
View christophrumpel/larastreamers on GitHub

app/View/Components/AddStreamsToCalendar.php

Open in 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');
}
}

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>

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.