{{-- Preloader css --}} {{-- --}} {{--
--}}
@if(get_setting('header_logo'))
@else
@endif
Live Streaming
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) { $country_ids = [240, $countryId]; // Array of values to search for (240 - id for all countries) $videos = App\Models\Video::with('categories') ->whereRaw('FIND_IN_SET(?, countries) OR FIND_IN_SET(?, countries)', $country_ids)->get(); //->where('country_id',$countryId)->orWhere('country_id', '=', NULL)->get(); //$query->whereRaw('FIND_IN_SET(?, countries) OR FIND_IN_SET(?, countries)', $country_ids); 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']}}
{{$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 $searchDP = isset($_GET['search']) ? $_GET['search'] : ''; $searchMb = isset($_GET['search_mb']) ? $_GET['search_mb'] : ''; $device = (!empty($searchDP)) ? 'dp' : ((!empty($searchMb)) ? 'mb' : ''); $url = (isset($_GET['search']) && ($_GET['search'] != null) || isset($_GET['search_mb']) && ($_GET['search_mb'] != null)) ? route('search.videos', ['device' => $device, 'slug' => $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
--}}
@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
Select Country
×
Click to Select
{{ csrf_field() }}
@if(isset($countries)) @foreach($countries as $country)
id) ? print 'checked' : ''; @endphp name="country" onchange="this.form.submit()" class="countrycheckboxinput" style="cursor:pointer !important;">
{{ $country->country_name }}
@endforeach @endif