video section ads fixed

This commit is contained in:
Mahri Ilmedova 2022-08-26 17:31:21 +05:00
parent f14033e22a
commit 95be5feb33
2 changed files with 10 additions and 16 deletions

View File

@ -22,8 +22,7 @@ class HomeController extends Controller
public function index(){
$materials = Material::orderBy('created_at','DESC')->paginate(6);
$topheaderadvers = Topheaderadv::inRandomOrder()->get();
$topheaderadvs = $topheaderadvers[0];
$topheaderadvs = Topheaderadv::inRandomOrder()->first();
$title = 'TurkmenTV';
$keywords = 'TurkmenTV';
$meta_description = 'TurkmenTV';
@ -43,8 +42,7 @@ class HomeController extends Controller
$request = \request();
$sort = $request['sort'];
$sort = $sort ?? 'all';
$topheaderadvers = Topheaderadv::inRandomOrder()->get();
$topheaderadvs = $topheaderadvers[0];
$topheaderadvs = Topheaderadv::inRandomOrder()->first();
if($cat_id != 0){
$cat = Category:: findOrFail($cat_id);
@ -146,8 +144,7 @@ class HomeController extends Controller
public function material($material_id){
$material = Material::findOrFail($material_id);
$topheaderadvers = Topheaderadv::inRandomOrder()->get();
$topheaderadvs = $topheaderadvers[0];
$topheaderadvs = Topheaderadv::inRandomOrder()->get();
$liked = false;
$order = null;
$subscribed = false;
@ -320,8 +317,7 @@ class HomeController extends Controller
}
public function search(){
$topheaderadvers = Topheaderadv::inRandomOrder()->get();
$topheaderadvs = $topheaderadvers[0];
$topheaderadvs = Topheaderadv::inRandomOrder()->first();
$request = \request();
$key = $request['key'];
if(empty($key))
@ -353,8 +349,7 @@ class HomeController extends Controller
}
public function subscriptions(){
$topheaderadvers = Topheaderadv::inRandomOrder()->get();
$topheaderadvs = $topheaderadvers[0];
$topheaderadvs = Topheaderadv::inRandomOrder()->first();
$subscriptions = Subscription::all();
$title = "Subscriptions";
$keywords = "Subscriptions, Turkmen TV subscriptions";
@ -375,7 +370,7 @@ class HomeController extends Controller
'meta_description' => 'Turkmentv.gov.tm - radio diňlemek',
'id' => $id
]);
}
public function webpage($id){

View File

@ -41,11 +41,10 @@
</div>
<div class="container kesde" style="width: 100%; margin-top: 50px">
{{-- <a href=""><img src="{{asset('static/img/okuz.jpg')}}" alt="" style="width: 100%"></a> --}}
@if(!empty($topheaderadvs))
<a href="{{$topheaderadvs -> url_bottom}}">
<img src="https://content.turkmentv.gov.tm/{{$topheaderadvs->bottom_img_url}}" alt="{{$topheaderadvs->alt_bottom}}" style="width: 100%">
</a>
<a href="{{$topheaderadvs -> url_bottom}}">
<img src="https://content.turkmentv.gov.tm/{{$topheaderadvs->bottom_img_url}}" alt="{{$topheaderadvs->alt_bottom}}" style="width: 100%">
</a>
@endif
</div>
@endsection
@endsection