This commit is contained in:
tanch0 2024-06-19 00:25:14 +05:45
parent 50b8768a34
commit 9bb573169d
15 changed files with 431 additions and 171 deletions

View File

@ -3,6 +3,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Mail\sendEmail; use App\Mail\sendEmail;
use App\Models\Advertisements;
use App\Models\Articles; use App\Models\Articles;
use App\Models\Economies; use App\Models\Economies;
use App\Models\Horoscopes; use App\Models\Horoscopes;
@ -29,13 +30,20 @@ class WebsiteController extends Controller
$headerMenuItems = Menuitems::where(['parent_menu' => 0, "status" => 1, "menulocations_id" => 1])->with('children')->orderBy('display_order')->get(); $headerMenuItems = Menuitems::where(['parent_menu' => 0, "status" => 1, "menulocations_id" => 1])->with('children')->orderBy('display_order')->get();
// dd($headerMenuItems->toArray()); // dd($headerMenuItems->toArray());
$footerMenuItems = Menuitems::where(['parent_menu' => 0, "status" => 1, "menulocations_id" => 2])->with('children')->orderBy('display_order')->get(); $footerMenuItems = Menuitems::where(['parent_menu' => 0, "status" => 1, "menulocations_id" => 2])->with('children')->orderBy('display_order')->get();
// dd($footerMenuItems->toArray()); $latestNews = News::where('status', 1)->inRandomOrder()->limit(4)->get();
$recentNews = News::where('status', 1)->inRandomOrder()->limit(4)->get(); // dd($recentNews);
$ads = Advertisements::where('status', 1)->where('parent_advertisement',0)->get();
// dd($ads->toArray());
$adsWithChildren = Advertisements::where('status',1)->where('parent_advertisement',0)->orderBy('display_order')->with('children')->get();
// dd($adsWithChildren->toArray());
View::share( View::share(
[ [
'headerMenuItems' => $headerMenuItems, 'headerMenuItems' => $headerMenuItems,
'footerMenuItems' => $footerMenuItems, 'footerMenuItems' => $footerMenuItems,
'recentNews' => $recentNews, 'latestNews' => $latestNews,
'ads' => $ads,
'adsWithChildren' => $adsWithChildren
] ]
); );
} }

View File

@ -1,32 +1,33 @@
<?php <?php
namespace App\Models;
use App\Models\User; namespace App\Models;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Advertisements extends Model use App\Models\User;
{ use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Advertisements extends Model
{
use HasFactory, CreatedUpdatedBy; use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'advertisement_id'; protected $primaryKey = 'advertisement_id';
public $timestamps = true; public $timestamps = true;
protected $fillable =[ protected $fillable = [
'title', 'title',
'section', 'ad_categories_id',
'alias', 'alias',
'parent_advertisement', 'parent_advertisement',
'thumb', 'thumb',
'link', 'link',
'display_order', 'display_order',
'status', 'status',
'remarks', 'remarks',
'createdBy', 'createdBy',
'updatedBy', 'updatedBy',
'created_at', 'created_at',
'updated_at', 'updated_at',
]; ];
@ -50,4 +51,14 @@
get: fn ($value) => User::find($value) ? User::find($value)->name : '', get: fn ($value) => User::find($value) ? User::find($value)->name : '',
); );
} }
public function children()
{
return $this->hasMany(Advertisements::class, 'parent_advertisement');
} }
public function parent()
{
return $this->belongsTo(Advertisements::class, 'parent_advertisement');
}
}

View File

@ -1,23 +1,23 @@
@extends('hulaki_khabar.layout.layout') @extends('hulaki_khabar.layout.layout')
@section('content') @section('content')
@include('hulaki_khabar.home.main-news') @include('hulaki_khabar.home.main-news')
@include('hulaki_khabar.home.ads') {{-- @include('hulaki_khabar.home.ads') --}}
@include('hulaki_khabar.home.country') @include('hulaki_khabar.home.country')
@include('hulaki_khabar.home.ads') {{-- @include('hulaki_khabar.home.ads') --}}
@include('hulaki_khabar.home.international') @include('hulaki_khabar.home.international')
@include('hulaki_khabar.home.politics') @include('hulaki_khabar.home.politics')
@include('hulaki_khabar.home.ads') {{-- @include('hulaki_khabar.home.ads') --}}
@include('hulaki_khabar.home.interview') @include('hulaki_khabar.home.interview')
@include('hulaki_khabar.home.business') @include('hulaki_khabar.home.business')
@include('hulaki_khabar.home.ads') {{-- @include('hulaki_khabar.home.ads') --}}
@include('hulaki_khabar.home.sports') @include('hulaki_khabar.home.sports')
@include('hulaki_khabar.home.culture-tech') @include('hulaki_khabar.home.culture-tech')
@include('hulaki_khabar.home.ads') {{-- @include('hulaki_khabar.home.ads') --}}
@include('hulaki_khabar.home.entertainment') @include('hulaki_khabar.home.entertainment')
@include('hulaki_khabar.home.feature') @include('hulaki_khabar.home.feature')
@include('hulaki_khabar.home.ads') {{-- @include('hulaki_khabar.home.ads') --}}
@include('hulaki_khabar.home.main-video') @include('hulaki_khabar.home.main-video')
@include('hulaki_khabar.home.ads') {{-- @include('hulaki_khabar.home.ads') --}}
@include('hulaki_khabar.home.society') @include('hulaki_khabar.home.society')
@include('hulaki_khabar.home.health') @include('hulaki_khabar.home.health')
@endsection @endsection

View File

@ -42,13 +42,14 @@
@foreach ($type->news->take(5) as $item) @foreach ($type->news->take(5) as $item)
<div class="single-business-news"> <div class="single-business-news">
<div class="business-news-image-fluid"> <div class="business-news-image-fluid">
<a href="{{route('newsDetail',['alias' => $item->alias])}}"> <a href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
<img src="{{ asset($item->thumb) }}" alt="image-fluid"> <img src="{{ asset($item->thumb) }}" alt="image-fluid">
</a> </a>
</div> </div>
<div class="business-news-content"> <div class="business-news-content">
<h3> <h3>
<a href="{{route('newsDetail',['alias'=> $item->alias])}}">{{ $item->title }}</a> <a
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->title }}</a>
</h3> </h3>
</div> </div>
</div> </div>
@ -62,7 +63,8 @@
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-lg-4 col-sm-4"> <div class="col-lg-4 col-sm-4">
<div class="post-image-fluid"> <div class="post-image-fluid">
<a href="{{route('newsDetail',['alilas'=> $item->alias])}}"> <a
href="{{ route('newsDetail', ['alilas' => $item->alias]) }}">
<img src="{{ asset($item->thumb) }}" <img src="{{ asset($item->thumb) }}"
alt="image"> alt="image">
</a> </a>
@ -72,7 +74,7 @@
<div class="post-content"> <div class="post-content">
<h3> <h3>
<a <a
href="{{route('newsDetail',['alilas'=> $item->alias])}}">{{ $item->title }}</a> href="{{ route('newsDetail', ['alilas' => $item->alias]) }}">{{ $item->title }}</a>
</h3> </h3>
</div> </div>
</div> </div>
@ -91,20 +93,64 @@
</div> </div>
<div class="col-lg-4"> <div class="col-lg-4">
<!-- Sidebar -->
<aside class="widget-area"> <aside class="widget-area">
@foreach ($adsWithChildren as $parentads)
@if ($parentads->ad_categories_id == 9)
<section class="widget widget_featured_reports"> <section class="widget widget_featured_reports">
<div class=" col-lg-10" style=" margin-left: 10%;"> <div class=" col-lg-10" style=" margin-left: 10%;">
<img src="{{ asset('hulaki/assets/img/add/ads9.jpg') }}" alt="image-fluid"> <img src="{{ asset($parentads->thumb) }}" alt="{{ $parentads->title }}">
</div> </div>
</section> </section>
@if ($parentads->children->isNotEmpty())
@foreach ($parentads->children as $child)
<section class="widget widget_featured_reports"> <section class="widget widget_featured_reports">
<div class=" col-lg-10" style=" margin-left: 10%;"> <div class=" col-lg-10" style=" margin-left: 10%;">
<img src="{{ asset('hulaki/assets/img/add/ads6.gif') }}" alt="image-fluid"> <img src="{{ asset($child->thumb) }}" alt="{{ $child->title }}">
</div> </div>
</section> </section>
@endforeach
@endif
@endif
@endforeach
</aside> </aside>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
<section class="default-news-area">
<div class="container">
<div class="row">
<div class="col-lg-12">
@if ($ads->isNotEmpty())
@foreach ($ads as $ad)
@if ($ad->ad_categories_id == 8)
<a href="{{ $ad->link }}">
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
</a>
@endif
@endforeach
@endif
</div>
</div>
</div>
</section>
{{-- <section class="default-news-area">
<div class="container">
<div class="row">
<div class="col-lg-12">
@if ($ads->isNotEmpty())
@foreach ($ads as $ad)
@if ($ad->ad_categories_id == )
<a href="{{ $ad->link }}">
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
</a>
@endif
@endforeach
@endif
</div>
</div>
</div>
</section> --}}

View File

@ -75,7 +75,8 @@
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-lg-4 col-sm-4"> <div class="col-lg-4 col-sm-4">
<div class="post-image"> <div class="post-image">
<a href="{{route('newsDetail',['alias' => $item->alias])}}"> <a
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
<img src="{{ asset($item->image) }}" <img src="{{ asset($item->image) }}"
alt="image"> alt="image">
</a> </a>
@ -86,7 +87,7 @@
<div class="post-content"> <div class="post-content">
<h3> <h3>
<a <a
href="{{route('newsDetail',['alias' => $item->alias])}}">{{ $item->short_description }}</a> href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->short_description }}</a>
</h3> </h3>
</div> </div>
</div> </div>
@ -115,12 +116,13 @@
@foreach ($type->news->take(1) as $item) @foreach ($type->news->take(1) as $item)
@if ($loop->first) @if ($loop->first)
<div class="featured-reports-image"> <div class="featured-reports-image">
<a href="{{route('newsDetail',['alias' => $item->alias])}}"> <a href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
<img src="{{ asset($item->thumb) }}" alt="{{ $item->title }}"> <img src="{{ asset($item->thumb) }}" alt="{{ $item->title }}">
</a> </a>
<div class="featured-reports-content"> <div class="featured-reports-content">
<h3> <h3>
<a href="{{route('newsDetail',['alias' => $item->alias])}}">{{ $item->short_description }}</a> <a
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->short_description }}</a>
</h3> </h3>
</div> </div>
</div> </div>
@ -137,7 +139,7 @@
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-lg-4 col-sm-4"> <div class="col-lg-4 col-sm-4">
<div class="post-image"> <div class="post-image">
<a href="{{route('newsDetail',['alias' => $item->alias])}}"> <a href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
<img src="{{ asset($item->thumb) }}" alt="image"> <img src="{{ asset($item->thumb) }}" alt="image">
</a> </a>
</div> </div>
@ -146,7 +148,8 @@
<div class="col-lg-8 col-sm-8"> <div class="col-lg-8 col-sm-8">
<div class="post-content"> <div class="post-content">
<h3> <h3>
<a href="{{route('newsDetail',['alias' => $item->alias])}}">{{ $item->short_description }}</a> <a
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->short_description }}</a>
</h3> </h3>
</div> </div>
</div> </div>
@ -159,3 +162,21 @@
</div> </div>
</div> </div>
</section> </section>
<section class="default-news-area">
<div class="container">
<div class="row">
<div class="col-lg-12">
@if ($ads->isNotEmpty())
@foreach ($ads as $ad)
@if ($ad->ad_categories_id == 4)
<a href="{{ $ad->link }}">
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
</a>
@endif
@endforeach
@endif
</div>
</div>
</div>
</section>

View File

@ -143,16 +143,49 @@
</div> </div>
<!-- Sidebar --> <!-- Sidebar -->
<div class="col-lg-4"> <div class="col-lg-4">
<aside class="widget-area"> <aside class="widget-area">
@foreach ($adsWithChildren as $parentads)
@if ($parentads->ad_categories_id == 11)
<section class="widget widget_featured_reports"> <section class="widget widget_featured_reports">
<div class=" col-lg-10" style=" margin-left: 10%;"> <div class=" col-lg-10" style=" margin-left: 10%;">
<img src="{{ asset('hulaki/assets/img/add/ads9.jpg') }}" alt="image" <img src="{{ asset($parentads->thumb) }}" alt="{{ $parentads->title }}">
style="margin-top: 10%;">
</div> </div>
</section> </section>
@if ($parentads->children->isNotEmpty())
@foreach ($parentads->children as $child)
<section class="widget widget_featured_reports">
<div class=" col-lg-10" style=" margin-left: 10%;">
<img src="{{ asset($child->thumb) }}" alt="{{ $child->title }}">
</div>
</section>
@endforeach
@endif
@endif
@endforeach
</aside> </aside>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
<section class="default-news-area">
<div class="container">
<div class="row">
<div class="col-lg-12">
@if ($ads->isNotEmpty())
@foreach ($ads as $ad)
@if ($ad->ad_categories_id == 10)
<a href="{{ $ad->link }}">
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
</a>
@endif
@endforeach
@endif
</div>
</div>
</div>
</section>

View File

@ -43,14 +43,44 @@
<!-- Sidebar --> <!-- Sidebar -->
<div class="col-lg-4"> <div class="col-lg-4">
<aside class="widget-area"> <aside class="widget-area">
@foreach ($adsWithChildren as $parentads)
@if ($parentads->ad_categories_id == 13)
<section class="widget widget_featured_reports"> <section class="widget widget_featured_reports">
<div class=" col-lg-10" style=" margin-left: 10%;"> <div class=" col-lg-10" style=" margin-left: 10%;">
<img src="{{ asset('hulaki/assets/img/add/ads9.jpg') }}" alt="image" <img src="{{ asset($parentads->thumb) }}" alt="{{ $parentads->title }}">
style="margin-top: 0%;">
</div> </div>
</section> </section>
@if ($parentads->children->isNotEmpty())
@foreach ($parentads->children as $child)
<section class="widget widget_featured_reports">
<div class=" col-lg-10" style=" margin-left: 10%;">
<img src="{{ asset($child->thumb) }}" alt="{{ $child->title }}">
</div>
</section>
@endforeach
@endif
@endif
@endforeach
</aside> </aside>
</div> </div>
<hr> <hr>
</div> </div>
</section> </section>
<section class="default-news-area">
<div class="container">
<div class="row">
<div class="col-lg-12">
@if ($ads->isNotEmpty())
@foreach ($ads as $ad)
@if ($ad->ad_categories_id == 12)
<a href="{{ $ad->link }}">
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
</a>
@endif
@endforeach
@endif
</div>
</div>
</div>
</section>

View File

@ -20,14 +20,15 @@
@foreach ($type->news as $item) @foreach ($type->news as $item)
<div class="single-health-news"> <div class="single-health-news">
<div class="health-news-image-fluid"> <div class="health-news-image-fluid">
<a href="{{route('newsDetail',['alias' => $item->alias])}}"> <a href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
<img src="{{ asset($item->thumb) }}" alt="image-fluid"> <img src="{{ asset($item->thumb) }}" alt="image-fluid">
</a> </a>
</div> </div>
<div class="health-news-content"> <div class="health-news-content">
<h3> <h3>
<a href="{{route('newsDetail',['alias' => $item->alias])}}">{{ $item->title }}</a> <a
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->title }}</a>
</h3> </h3>
</div> </div>
</div> </div>
@ -40,12 +41,24 @@
<!-- Sidebar --> <!-- Sidebar -->
<div class="col-lg-4"> <div class="col-lg-4">
<aside class="widget-area"> <aside class="widget-area">
@foreach ($adsWithChildren as $parentads)
@if ($parentads->ad_categories_id == 15)
<section class="widget widget_featured_reports"> <section class="widget widget_featured_reports">
<div class=" col-lg-10" style=" margin-left: 10%;"> <div class=" col-lg-10" style=" margin-left: 10%;">
<img src="{{ asset('hulaki/assets/img/add/ads5.jpg') }}" alt="image-fluid" <img src="{{ asset($parentads->thumb) }}" alt="{{ $parentads->title }}">
style="margin-top: 5%;">
</div> </div>
</section> </section>
@if ($parentads->children->isNotEmpty())
@foreach ($parentads->children as $child)
<section class="widget widget_featured_reports">
<div class=" col-lg-10" style=" margin-left: 10%;">
<img src="{{ asset($child->thumb) }}" alt="{{ $child->title }}">
</div>
</section>
@endforeach
@endif
@endif
@endforeach
</aside> </aside>
</div> </div>
</div> </div>

View File

@ -24,13 +24,14 @@
@foreach ($type->news->take(1) as $item) @foreach ($type->news->take(1) as $item)
<div class="single-featured-reports"> <div class="single-featured-reports">
<div class="featured-reports-image"> <div class="featured-reports-image">
<a href="{{route('newsDetail',['alias' => $item->alias])}}"> <a href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
<img src="{{ asset($item->thumb) }}" alt="image" <img src="{{ asset($item->thumb) }}" alt="image"
class="international-news-image"> class="international-news-image">
</a> </a>
<div class="featured-reports-content mt-30"> <div class="featured-reports-content mt-30">
<h3> <h3>
<a href="{{route('newsDetail',['alias' => $item->alias])}}">{{ $item->short_description }}</a> <a
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->short_description }}</a>
</h3> </h3>
</div> </div>
</div> </div>
@ -49,7 +50,7 @@
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-lg-4 col-sm-4"> <div class="col-lg-4 col-sm-4">
<div class="post-image-fluid"> <div class="post-image-fluid">
<a href="{{route('newsDetail',['alias' => $item->alias])}}"> <a href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
<img src="{{ asset($item->thumb) }}" alt="image"> <img src="{{ asset($item->thumb) }}" alt="image">
</a> </a>
</div> </div>
@ -58,7 +59,7 @@
<div class="post-content"> <div class="post-content">
<h3> <h3>
<a <a
href="{{route('newsDetail',['alias' => $item->alias])}}">{{ $item->short_description }}</a> href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->short_description }}</a>
</h3> </h3>
</div> </div>
</div> </div>
@ -74,20 +75,18 @@
<!-- Sidebar --> <!-- Sidebar -->
<div class="col-lg-3"> <div class="col-lg-3">
<aside class="widget-area"> <aside class="widget-area">
@foreach ($adsWithChildren as $ads)
@if ($ads->children->isNotEmpty())
@foreach ($ads->children as $item)
@if ($item->ad_categories_id == 5)
<section class="widget widget_featured_reports"> <section class="widget widget_featured_reports">
<img src="{{ asset('hulaki/assets/img/ad/NepalLife-Final-Gif-Artwork-300x200pix2019-04-02.gif') }}" <img src="{{ asset($item->thumb) }}" alt="{{ $item->title }}"
alt="image" class="img-fluid">
</section>
<section class="widget widget_featured_reports">
<img src="{{ asset('hulaki/assets/img/ad/ncell.gif') }}" alt="image" class="img-fluid">
</section>
<section class="widget widget_featured_reports">
<img src="{{ asset('hulaki/assets/img/ad/ime-pay-300x2502018-12-16.gif') }}" alt="image"
class="img-fluid"> class="img-fluid">
</section> </section>
<section class="widget widget_featured_reports"> @endif
<img src="{{ asset('hulaki/assets/img/ad/300-x-150.png') }}" alt="image" class="img-fluid"> @endforeach
</section> @endif
@endforeach
</aside> </aside>
</div> </div>
</div> </div>

View File

@ -1,15 +1,17 @@
{{-- main-news --}} {{-- main-news --}}
<section class="main-news-area"> <section class="main-news-area">
<div class="container"> <div class="container">
@if($featuredNews) @if ($featuredNews)
<div class="row"> <div class="row">
<a href="#"> <a href="#">
<img src="{{asset('hulaki/assets/img/ad/Kicks_Desktop_1230x100-px_new.jpg')}}" alt="image" class="img-fluid" > <img src="{{ asset('hulaki/assets/img/ad/Kicks_Desktop_1230x100-px_new.jpg') }}" alt="image"
class="img-fluid">
</a> </a>
<div class="col-lg-12 mt-20"> <div class="col-lg-12 mt-20">
<div class="news-content mt-50 text-center"> <div class="news-content mt-50 text-center">
<h2> <h2>
<a href="{{route('newsDetail',['alias'=>$featuredNews->alias])}}"><b>{{$featuredNews->title}}</b></a> <a
href="{{ route('newsDetail', ['alias' => $featuredNews->alias]) }}"><b>{{ $featuredNews->title }}</b></a>
</h2> </h2>
</div> </div>
</div> </div>
@ -19,21 +21,38 @@
<div class="col-lg-12"> <div class="col-lg-12">
<div class="news-content" style="text-align: center; margin: 3%;"> <div class="news-content" style="text-align: center; margin: 3%;">
<h2> <h2>
<a href="news-details.php"><b>{{$featuredNews->short_description}}</b></a> <a href="news-details.php"><b>{{ $featuredNews->short_description }}</b></a>
</h2> </h2>
</div> </div>
<div class="single-main-news" > <div class="single-main-news">
<a href="news-details.php"> <a href="news-details.php">
<img src="{{asset($featuredNews->image)}}" alt="image"> <img src="{{ asset($featuredNews->image) }}" alt="image">
</a> </a>
</div> </div>
<div class="news-content" style="text-align: center;"> <div class="news-content" style="text-align: center;">
<p>{!!$featuredNews->content!!}</P> <p>{!! $featuredNews->content !!}</P>
</div> </div>
</div> </div>
</div> </div>
@endif @endif
</div> </div>
</section> </section>
<section class="default-news-area">
<div class="container">
<div class="row">
<div class="col-lg-12">
@if ($ads->isNotEmpty())
@foreach ($ads as $ad)
@if ($ad->ad_categories_id == 3)
<a href="{{ $ad->link }}">
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
</a>
@endif
@endforeach
@endif
</div>
</div>
</div>
</section>
<!-- End Main News Area --> <!-- End Main News Area -->

View File

@ -113,3 +113,21 @@
</div> </div>
</div> </div>
</section> </section>
<section class="default-news-area">
<div class="container">
<div class="row">
<div class="col-lg-12">
@if ($ads->isNotEmpty())
@foreach ($ads as $ad)
@if ($ad->ad_categories_id == 14)
<a href="{{ $ad->link }}">
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
</a>
@endif
@endforeach
@endif
</div>
</div>
</div>
</section>

View File

@ -15,21 +15,21 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-lg-7"> <div class="col-lg-7">
{{-- @dd($politics) --}}
@foreach ($politics as $type) @foreach ($politics as $type)
@if ($type->alias ==='politics') @if ($type->alias === 'politics')
@foreach ($type->news->take(1) as $item) @foreach ($type->news->take(1) as $item)
@if ($loop->first) @if ($loop->first)
<div class="single-culture-news"> <div class="single-culture-news">
<div class="culture-news-image"> <div class="culture-news-image">
<a href="{{route('newsDetail',['alias' => $item->alias])}}"> <a href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
<img src="{{ asset($item->thumb) }}" alt="image" <img src="{{ asset($item->thumb) }}" alt="image"
class="img-fluid"> class="img-fluid">
</a> </a>
</div> </div>
<div class="culture-news-content"> <div class="culture-news-content">
<h3> <h3>
<a href="{{route('newsDetail',['alias' => $item->alias])}}">{{ $item->short_description }}</a> <a
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->short_description }}</a>
</h3> </h3>
</div> </div>
</div> </div>
@ -48,7 +48,7 @@
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-lg-4 col-sm-4"> <div class="col-lg-4 col-sm-4">
<div class="culture-news-image"> <div class="culture-news-image">
<a href="{{route('newsDetail',['alias' => $item->alias])}}"> <a href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
<img src="{{ asset($item->thumb) }}" alt="image"> <img src="{{ asset($item->thumb) }}" alt="image">
</a> </a>
</div> </div>
@ -57,7 +57,7 @@
<div class="culture-news-content"> <div class="culture-news-content">
<h3> <h3>
<a <a
href="{{route('newsDetail',['alias' => $item->alias])}}">{{ $item->short_description }}</a> href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->short_description }}</a>
</h3> </h3>
</div> </div>
</div> </div>
@ -74,19 +74,44 @@
<!-- Sidebar --> <!-- Sidebar -->
<div class="col-lg-3"> <div class="col-lg-3">
<aside class="widget-area mt-50"> <aside class="widget-area mt-50">
@foreach ($adsWithChildren as $items)
@if ($items->ad_categories_id == 7)
<section class="widget widget_featured_reports"> <section class="widget widget_featured_reports">
<img src="{{ asset('hulaki/assets/img/ad/prabhu_pay_onlinekhabar.gif') }}" alt="image" <img src="{{ asset($items->thumb) }}" alt="{{ $items->title }}" class="img-fluid">
class="img-fluid"> </section>
</section> @endif
@if ($items->children->isNotEmpty())
<section class="widget widget_featured_reports"> @foreach ($items->children as $item)
<img src="{{ asset('hulaki/assets/img/ad/Nabil_jan_300-x-150.gif') }}" alt="image" @if ($item->ad_categories_id == 7)
<section class="widget widget_featured_reports">
<img src="{{ asset($item->thumb) }}" alt="{{ $item->title }}"
class="img-fluid"> class="img-fluid">
</section> </section>
@endif
@endforeach
@endif
@endforeach
</aside> </aside>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
<section class="default-news-area">
<div class="container">
<div class="row">
<div class="col-lg-12">
@if ($ads->isNotEmpty())
@foreach ($ads as $ad)
@if ($ad->ad_categories_id == 6)
<a href="{{ $ad->link }}">
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
</a>
@endif
@endforeach
@endif
</div>
</div>
</div>
</section>

View File

@ -1,6 +1,22 @@
@extends('hulaki_khabar.layout.layout') @extends('hulaki_khabar.layout.layout')
@section('content') @section('content')
<!-- Start News Details Area --> <section class="default-news-area pt-5">
<div class="container">
<div class="row">
<div class="col-lg-12">
@if ($ads->isNotEmpty())
@foreach ($ads as $ad)
@if ($ad->ad_categories_id == 17)
<a href="{{ $ad->link }}">
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
</a>
@endif
@endforeach
@endif
</div>
</div>
</div>
</section>
<section class="news-details-area bg-ffffff ptb-50"> <section class="news-details-area bg-ffffff ptb-50">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
@ -21,8 +37,7 @@
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="desc-image"> <div class="desc-image">
<img src="{{ asset($news->image) }}" <img src="{{ asset($news->image) }}" alt="image">
alt="image">
</div> </div>
</div> </div>
</div> </div>
@ -32,17 +47,25 @@
</div> </div>
</div> </div>
<section class="widget widget_featured_reports"> <section class="default-news-area pt-5">
<div class=" col-lg-10" style=" margin: 5%;"> <div class="container">
<img src="{{ asset('hulaki/assets/img/add/add.gif') }}" alt="image-fluid"> <div class="row">
</div> <div class="col-lg-12">
</section> @if ($ads->isNotEmpty())
<section class="widget widget_featured_reports"> @foreach ($ads as $ad)
<div class=" col-lg-10" style=" margin: 5%;"> @if ($ad->ad_categories_id == 16)
<img src="{{ asset('hulaki/assets/img/add/add1.gif') }}" alt="image-fluid"> <a href="{{ $ad->link }}">
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
</a>
@endif
@endforeach
@endif
</div>
</div>
</div> </div>
</section> </section>
</div> </div>
<div class="col-lg-3" id="sidebar"> <div class="col-lg-3" id="sidebar">
<aside class="widget-area mt-50"> <aside class="widget-area mt-50">
@ -55,11 +78,14 @@
<h3 class="widget-title">पछिल्लो समाचार </h3> <h3 class="widget-title">पछिल्लो समाचार </h3>
@foreach ($recentNews as $item) @foreach ($recentNews as $item)
<article class="item"> <article class="item">
<a href="{{route('newsDetail', ['alias'=>$item->alias])}}" class="thumb"> <a href="{{ route('newsDetail', ['alias' => $item->alias]) }}" class="thumb">
<img src="{{ asset($item->thumb) }}" alt="image" width="80px" height="80px"> <img src="{{ asset($item->thumb) }}" alt="image" width="80px"
height="80px">
</a> </a>
<div class="info"> <div class="info">
<h4 class="title usmall"><a href="{{route('newsDetail', ['alias'=>$item->alias])}}">{{ $item->title }}</a></h4> <h4 class="title usmall"><a
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->title }}</a>
</h4>
</div> </div>
</article> </article>
@endforeach @endforeach

View File

@ -124,7 +124,7 @@
<div class="col-lg-3 col-md-6" style="margin-left: -60px;"> <div class="col-lg-3 col-md-6" style="margin-left: -60px;">
<div class="single-footer-widget"> <div class="single-footer-widget">
<h2>पछिल्लो खबर </h2> <h2>पछिल्लो खबर </h2>
@foreach ($recentNews as $item) @foreach ($latestNews as $item)
<div class="post-content"> <div class="post-content">
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-md-4"> <div class="col-md-4">

View File

@ -57,14 +57,19 @@
<div class="container"> <div class="container">
<div class="logo"> <div class="logo">
<a href="index.php"> <a href="index.php">
<img src="{{ asset('hulka/assets/img/logo-1.png') }}" class="black-logo" alt="image"> <img src="<?php echo asset(SITEVARS->primary_logo); ?>" class="black-logo" alt="image">
<img src="{{ asset('hulka/assets/img/logo-3.png') }}" class="white-logo" alt="image"> <img src="<?php echo asset(SITEVARS->secondary_logo); ?>" class="white-logo" alt="image">
</a> </a>
</div> </div>
</div> </div>
<div class="col-lg-6"> <div class="col-lg-6">
<img src="{{ asset('hulka/assets/img/add/ads1.gif') }}" alt="image"> @if ($ads->isNotEmpty())
<img src="{{ asset('hulka/assets/img/add/ads1.gif') }}" alt="image"> @foreach ($ads as $ad)
@if ($ad->ad_categories_id == 1)
<img src="{{ asset($ad->thumb) }}" alt="image">
@endif
@endforeach
@endif
</div> </div>
</div> </div>
<div class="main-navbar"> <div class="main-navbar">
@ -82,8 +87,14 @@
<div class="col-lg-6"> <div class="col-lg-6">
<nav class="navbar navbar-expand-sm navbar-light"> <nav class="navbar navbar-expand-sm navbar-light">
<a class="navbar-brand"> <a class="navbar-brand">
<img src="{{ asset('hulaki/assets/img/add/ads10.gif') }}" class="black-logo" alt="image" @if ($ads->isNotEmpty())
@foreach ($ads as $ad)
@if ($ad->ad_categories_id == 1)
<img src="{{ asset($ad->thumb) }}" class="black-logo" alt="image"
style="margin-left: -250px;max-width: 880px; height: auto; display: block;"> style="margin-left: -250px;max-width: 880px; height: auto; display: block;">
@endif
@endforeach
@endif
</a> </a>
</nav> </nav>
</div> </div>
@ -199,7 +210,7 @@
@case('tbl_videos') @case('tbl_videos')
@php @php
$subMenu->link = route('showVideos') @endphp $subMenu->link = route('showVideos'); @endphp
@break @break
@default @default