{{-- Preloader css --}} {{-- --}} {{--
--}}
@if(get_setting('header_logo'))
@else
@endif
Live Streaming
@php $category_array = []; $countryId = NULL; if(isset($_GET['country'])){ $countryCode = $_GET['country']; } elseif(isset($_COOKIE['country'])){ $countryCode = $_COOKIE['country']; } else{ $countryCode = 'KE'; } if($countryCode!=NULL){ $country = App\Models\Country::where('country_code',$countryCode)->first(); $countryId = $country->id; } if($countryId!=NULL) { $videos = App\Models\Video::with('categories')->where('country_id',$countryId)->orWhere('country_id', '=', NULL)->get(); foreach($videos as $video) { foreach($video->categories as $category) { if(!in_array($category->name, $category_array)) { array_push($category_array, $category->name); } } } } @endphp @php $primaryMenu = Menu::getByName('Primary Menu'); @endphp @if(isset($primaryMenu)) @foreach($primaryMenu as $menu)
@if($countryId!=NULL) @if(in_array($menu['label'], $category_array))
{{$menu['label']}}
@endif @else
{{$menu['label']}}
@endif @if( $menu['child'] )
@foreach( $menu['child'] as $child )
{{ $child['label'] }}
@endforeach
@endif
@endforeach @endif
@php use App\Models\Country; if(!empty($_COOKIE['country'])){ $uurl=$_COOKIE['country']; }else{ $uurl='ke'; } $iCountry = Country::where('country_code',$uurl)->first(); $countryurl=$iCountry['country_name']; @endphp
@csrf
Search
@php $countries = App\Models\Country :: where('content_status',config('constant.ENABLE_FLAG'))->get(); if(isset($_POST['country'])){ $countryCode = $_POST['country']; } elseif(isset($_COOKIE['country'])){ $countryCode = $_COOKIE['country']; } else{ $countryCode = 'KE'; } if(isset($_POST['country'])){ $country = App\Models\Country :: where('country_code',$_POST['country'])->first(); $countryId = $country->id; } $search = (isset($_POST['search'])) ? $_POST['search'] : ''; @endphp
@php $url = (isset($_GET['search']) && ($_GET['search'] != null)) ? route('search.videos',[$uurl]) : route('home'); $search = (isset($_GET['search'])) ? $_GET['search'] : ''; @endphp @if(isset($countries)) @foreach($countries as $country) @if ($countryId==$country->id)
{{ $country->country_name }}
@endif @endforeach @endif
@if(!Auth::check())
@else {{--
{{ AUth::user()->name }}
--}}
{{ AUth::user()->name }}
My Account
Profile
Logout
@endif
{{--
Action
--}}
Select Country
×
Click to Select
@if(isset($countries)) @foreach($countries as $country)
id) ? print 'checked' : ''; @endphp name="country" onchange="this.form.submit()" class="countrycheckboxinput">
{{ $country->country_name }}
@endforeach @endif