@extends('layouts.front.main') @section('title', 'Notifications') @section('style') @endsection @section('content') @php $playlist = []; @endphp

My Notifications

@if($notifications->count() > 0)
  • Content Name
  • Type
  • Subscribed Since
  • Status
  • Remove
@foreach($notifications as $notification) @php // Get the content details based on type $contentName = ''; $contentImage = ''; $contentLink = '#'; $contentId = $notification->content_id; switch($notification->content_type) { case 'program': $program = \Modules\Album\Entities\Program::find($contentId); if($program) { $contentName = $program->program_name; $contentImage = asset('images/programs/'.$program->image); $contentLink = route('program_details', ['slug' => $program->slug]); } break; case 'podcast': $podcast = \Modules\Album\Entities\Podcast::find($contentId); if($podcast) { $contentName = $podcast->album_name; if($podcast->image && (strpos($podcast->image, 'http') !== false)) $contentImage = $podcast->image; else if($podcast->image && file_exists(public_path('images/podcast/'.$podcast->image))) $contentImage = asset('images/podcast/'.$podcast->image); else $contentImage = dummyImage('custom', $podcast->album_slug, 500); $contentLink = route('single_album', ['slug' => $podcast->album_slug]); } break; case 'episode': $audio = \Modules\Audio\Entities\Audio::find($contentId); if($audio) { $contentName = $audio->audio_title; $contentImage = $audio->image; $contentLink = route('program_details', ['slug' => $audio->parent_program->slug ?? '']); } break; } // Skip if content not found if(!$contentName) continue; @endphp @endforeach
@else

No Active Notifications

Click the icon on any program or podcast to get notified when new content is available.

Browse Content
@endif
@endsection @section('script') @endsection