merge issues

This commit is contained in:
rajustha 2024-05-08 09:13:25 +00:00
commit 2313bf7cc9
9 changed files with 1687 additions and 96 deletions

View File

@ -30,7 +30,6 @@ class WebsiteController extends Controller
$this->path = config('app.client_path'); $this->path = config('app.client_path');
$headerMenu = Menulocations::where('alias', 'header-menu')->first(); $headerMenu = Menulocations::where('alias', 'header-menu')->first();
$headerMenuItems = Menuitems::where('menulocations_id', $headerMenu->menulocation_id)->where('status','<>',-1)->where('parent_menu', 0)->with('children')->orderBy('display_order', 'asc')->get(); $headerMenuItems = Menuitems::where('menulocations_id', $headerMenu->menulocation_id)->where('status','<>',-1)->where('parent_menu', 0)->with('children')->orderBy('display_order', 'asc')->get();
$footerMenu = Menulocations::where('alias', 'footer-menu')->first(); $footerMenu = Menulocations::where('alias', 'footer-menu')->first();
$footerMenuItems = Menuitems::where('menulocations_id', $footerMenu->menulocation_id)->where('status','<>',-1)->where('parent_menu', 0)->with('children')->orderBy('display_order', 'asc')->get(); $footerMenuItems = Menuitems::where('menulocations_id', $footerMenu->menulocation_id)->where('status','<>',-1)->where('parent_menu', 0)->with('children')->orderBy('display_order', 'asc')->get();
// dd($footerMenuItems); // dd($footerMenuItems);
@ -89,7 +88,11 @@ class WebsiteController extends Controller
$data["sliders"] = Sliders::where('status', 1)->latest()->get(); $data["sliders"] = Sliders::where('status', 1)->latest()->get();
$data["franchises"] = Franchises::latest()->take(4)->get(); $data["franchises"] = Franchises::latest()->take(4)->get();
$data["testimonials"] = Testimonials::where('status', 1)->latest()->get(); $data["testimonials"] = Testimonials::where('status', 1)->latest()->get();
<<<<<<< HEAD
$data['services'] = Services::take(6)->get(); $data['services'] = Services::take(6)->get();
=======
$data['services'] = Services::latest()->where('parent_service',null)->take(6)->get();
>>>>>>> 9fa6a5d79720007756721d82c4fde70e31a0f1f1
$data['partners'] = Partners::latest()->get(); $data['partners'] = Partners::latest()->get();
$data["news"] = News::latest()->take(6)->get(); $data["news"] = News::latest()->take(6)->get();
@ -172,7 +175,7 @@ class WebsiteController extends Controller
->orWhere('parent_service', 0) ->orWhere('parent_service', 0)
->select(['title', 'alias']) ->select(['title', 'alias'])
->get(); ->get();
$service = Services::where('alias', $alias)->where('status','<>',-1)->with('children')->first(); $service = Services::where('alias', $alias)->where('status','<>',-1)->with('children',fn($query)=>$query->latest())->first();
return view('client.topCargo.service-single', compact('service', 'serviceLists')); return view('client.topCargo.service-single', compact('service', 'serviceLists'));
} }
@ -201,8 +204,7 @@ class WebsiteController extends Controller
'message' => 'required|min:10', 'message' => 'required|min:10',
'phone' => 'required|string|regex:/^98\d{8}$/', 'phone' => 'required|string|regex:/^98\d{8}$/',
]); ]);
$sent = Mail::to(SITEVARS->email)->send(new ContactMail($validated));
$sent = Mail::to('sm.bibhuti@gmail.com')->send(new ContactMail($validated));
if ($sent) { if ($sent) {
return response()->json(['success' => 'Email sent successfully']); return response()->json(['success' => 'Email sent successfully']);
@ -221,7 +223,7 @@ class WebsiteController extends Controller
'freightType' => 'required|array', 'freightType' => 'required|array',
'freightType.*' => 'required|string', 'freightType.*' => 'required|string',
]); ]);
$sent = Mail::to('sm.bibhuti@gmail.com')->send(new QuoteMail($validated)); $sent = Mail::to(SITEVARS->email)->send(new QuoteMail($validated));
if ($sent) { if ($sent) {
return response()->json(['success' => 'Email sent successfully']); return response()->json(['success' => 'Email sent successfully']);
} else { } else {

View File

@ -1,6 +1,7 @@
<?php <?php
namespace App\Models; namespace App\Models;
use App\Models\Scopes\StatusScope;
use App\Models\User; use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute; use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
@ -49,4 +50,9 @@ class News extends Model
get: fn($value) => User::find($value) ? User::find($value)->name : '', get: fn($value) => User::find($value) ? User::find($value)->name : '',
); );
} }
public static function boot(){
parent::boot();
static::addGlobalScope(new StatusScope());
}
} }

View File

@ -0,0 +1,18 @@
<?php
namespace App\Models\Scopes;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
class StatusScope implements Scope
{
/**
* Apply the scope to a given Eloquent query builder.
*/
public function apply(Builder $builder, Model $model): void
{
$builder->where('status',1);
}
}

View File

@ -76,7 +76,7 @@
</ul> </ul>
</li> </li>
@else @else
<li><a href="{{ $menuItem->link }}">{{ $menuItem->title }}</a></li> <li><a @if($menuItem->title =="Quote") class = "fh-btn btn" style="color:white;"@endif href="{{ $menuItem->link }}">{{ $menuItem->title }}</a></li>
@endif @endif
@endforeach @endforeach
</ul> </ul>

View File

@ -34,27 +34,21 @@
<!-- LAYER NR. 2 --> <!-- LAYER NR. 2 -->
<style>
.slider-title {
line-height: 65px !important;
}
.slider-desc {
line-height: 35px !important;
}
</style>
<div class="tp-caption ch_title text-uppercase slider-title tp-resizeme" <div class="tp-caption ch_title text-uppercase slider-title tp-resizeme"
id="slide-1-layer-1" data-x="['left','left','left','left']" id="slide-1-layer-1" data-x="['left','left','left','left']"
data-hoffset="['540','40','40','40']" data-y="['top','top','top','top']" data-hoffset="['540','40','40','40']" data-y="['top','top','top','top']"
data-voffset="['350','250','350','200']" data-fontsize="['55','50','45','25']" data-voffset="['350','250','350','200']" data-fontsize="['45','50','45','25']"
data-lineheight="['55','50','45','25']" data-width="none" data-height="none" data-lineheight="['55','50','45','25']" data-width="none" data-height="none"
data-whitespace="normal" data-type="text" data-responsive_offset="on" data-whitespace="normal" data-type="text" data-responsive_offset="on"
data-frames='[{"delay":200,"speed":500,"text_c":"transparent","bg_c":"transparent","use_text_c":false,"use_bg_c":false,"frame":"0","from":"opacity:0;","to":"o:1;","ease":"Power3.easeInOut"},{"delay":"wait","speed":500,"use_text_c":false,"use_bg_c":false,"text_c":"transparent","bg_c":"transparent","frame":"999","to":"opacity:0;","ease":"Power3.easeInOut"}]' data-frames='[{"delay":200,"speed":500,"text_c":"transparent","bg_c":"transparent","use_text_c":false,"use_bg_c":false,"frame":"0","from":"opacity:0;","to":"o:1;","ease":"Power3.easeInOut"},{"delay":"wait","speed":500,"use_text_c":false,"use_bg_c":false,"text_c":"transparent","bg_c":"transparent","frame":"999","to":"opacity:0;","ease":"Power3.easeInOut"}]'
data-textAlign="['inherit','inherit','inherit','inherit']" data-paddingtop="[0,0,0,0]" data-textAlign="['inherit','inherit','inherit','inherit']" data-paddingtop="[0,0,0,0]"
data-paddingright="[0,0,0,0]" data-paddingbottom="[0,0,0,0]" data-paddingright="[0,0,0,0]" data-paddingbottom="[0,0,0,0]"
data-paddingleft="[0,0,0,0]" data-paddingleft="[0,0,0,0]"
style="z-index: 6; white-space: normal; overflow:visible; width: 300%; word-wrap: break-word; letter-spacing: 0px;"> style="z-index: 8; letter-spacing: 0px; width: 200%; ">
{{ $slider->slider_title }} {{ $slider->slider_title }}
</div> </div>
@ -62,7 +56,7 @@
<!-- LAYER NR. 4 --> <!-- LAYER NR. 4 -->
<div class="tp-caption ch_content slider-desc tp-resizeme" id="slide-1-layer-3" <div class="tp-caption ch_content slider-desc tp-resizeme" id="slide-1-layer-3"
data-x="['left','left','left','left']" data-hoffset="['540','40','40','40']" data-x="['left','left','left','left']" data-hoffset="['540','40','40','40']"
data-y="['top','top','top','top']" data-voffset="['505','415','515','340']" data-y="['top','top','top','top']" data-voffset="['555','415','515','340']"
data-fontsize="['24','24','18','18']" data-lineheight="['24','24','18','18']" data-fontsize="['24','24','18','18']" data-lineheight="['24','24','18','18']"
data-width="none" data-height="none" data-whitespace="normal" data-type="text" data-width="none" data-height="none" data-whitespace="normal" data-type="text"
data-responsive_offset="on" data-responsive_offset="on"
@ -75,33 +69,7 @@
<!-- LAYER NR. 6 -->
<a class="tp-caption ch_button rev-btn " href="{{ route('article.single', 'who-are-we') }}"
target="_blank" id="slide-1-layer-5" data-x="['left','left','left','left']"
data-hoffset="['540','40','40','40']" data-y="['top','top','top','top']"
data-voffset="['600','520','620','430']" data-width="none" data-height="none"
data-whitespace="nowrap" data-type="button" data-actions=''
data-responsive_offset="on" data-responsive="off"
data-frames='[{"delay":800,"speed":1000,"text_c":"transparent","bg_c":"transparent","use_text_c":false,"use_bg_c":false,"frame":"0","from":"opacity:0;","to":"o:1;","ease":"Power3.easeInOut"},{"delay":"wait","speed":1000,"use_text_c":false,"use_bg_c":false,"text_c":"transparent","bg_c":"transparent","frame":"999","to":"opacity:0;","ease":"Power3.easeInOut"},{"frame":"hover","speed":"0","ease":"Linear.easeNone","to":"o:1;rX:0;rY:0;rZ:0;z:0;","style":"c:rgb(255,255,255);bg:rgb(255,0,0);bc:rgb(255,0,0);bw:1 1 1 1;"}]'
data-textAlign="['inherit','inherit','inherit','inherit']"
data-paddingtop="[12,12,12,12]" data-paddingright="[35,35,35,35]"
data-paddingbottom="[12,12,12,12]" data-paddingleft="[35,35,35,35]"
style="z-index: 10; white-space: nowrap; letter-spacing: px;background-color:rgba(0, 0, 0, 0);border-color:rgb(255,255,255);outline:none;box-shadow:none;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;cursor:pointer;text-decoration: none;">About
us </a>
<!-- LAYER NR. 7 -->
<a class="tp-caption ch_button rev-btn " href="{{ route('quote') }}" target="_blank"
id="slide-1-layer-7" data-x="['left','left','left','left']"
data-hoffset="['750','250','270','40']" data-y="['top','top','top','top']"
data-voffset="['600','520','620','500']" data-width="none" data-height="none"
data-whitespace="nowrap" data-type="button" data-actions=''
data-responsive_offset="on" data-responsive="off"
data-frames='[{"delay":800,"speed":1000,"text_c":"transparent","bg_c":"transparent","use_text_c":false,"use_bg_c":false,"frame":"0","from":"opacity:0;","to":"o:1;","ease":"Power3.easeInOut"},{"delay":"wait","speed":1000,"use_text_c":false,"use_bg_c":false,"text_c":"transparent","bg_c":"transparent","frame":"999","to":"opacity:0;","ease":"Power3.easeInOut"},{"frame":"hover","speed":"0","ease":"Linear.easeNone","to":"o:1;rX:0;rY:0;rZ:0;z:0;","style":"c:rgb(255,255,255);bg:rgb(255,0,0);bc:rgb(255,0,0);bw:1 1 1 1;"}]'
data-textAlign="['inherit','inherit','inherit','inherit']"
data-paddingtop="[12,12,12,12]" data-paddingright="[35,35,35,35]"
data-paddingbottom="[12,12,12,12]" data-paddingleft="[35,35,35,35]"
style="z-index: 11; white-space: nowrap; letter-spacing: px;background-color:rgba(0, 0, 0, 0);border-color:rgb(255,255,255);outline:none;box-shadow:none;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;cursor:pointer;text-decoration: none;">Request
Quote </a>
</li> </li>
@endforeach @endforeach

View File

@ -7,37 +7,41 @@
<h2>{{ $whyChooseUs->title }}?</h2> <h2>{{ $whyChooseUs->title }}?</h2>
</div> </div>
@foreach ($whyChooseUs->children as $item) @foreach ($whyChooseUs->children as $item)
@if($item->status != -1) @if ($item->status != -1)
<div class="fh-icon-box style-2 icon-left has-line"> @if ($loop->last)
<div class="fh-icon-box style-2 icon-left">
@else
<div class="fh-icon-box style-2 icon-left has-line">
@endif
<span class="fh-icon"><a href="javascript:void(0)"><i <span class="fh-icon"><a href="javascript:void(0)"><i
class="{{$item->icon}}"></i></a></span> class="{{ $item->icon }}"></i></a></span>
<h4 class="box-title"><a href="javascript:void(0)"> <span>{{ $item->title }}</span></a> <h4 class="box-title"><a href="javascript:void(0)"> <span>{{ $item->title }}</span></a>
</h4> </h4>
<div class="desc"> <div class="desc">
{!! strip_tags($item->text) !!} {!! strip_tags($item->text) !!}
</div> </div>
</div>
{{-- @if ($loop->last)
<div class="fh-icon-box style-2 icon-left">
<span class="fh-icon"><a href="javascript:void(0)"><i
class="{{ $item->icon }}"></i></a></span>
<h4 class="box-title"><a href="javascript:void(0)"><span>{{ $item->title }}</span></a>
</h4>
<div class="desc">
{!! strip_tags($item->text) !!}
</div> </div>
</div>
@endif --}}
@endif
@endforeach
@if ($loop->last)
<div class="fh-icon-box style-2 icon-left">
<span class="fh-icon"><a href="javascript:void(0)"><i
class="{{$item->icon}}"></i></a></span>
<h4 class="box-title"><a href="javascript:void(0)"><span>{{$item->title}}</span></a>
</h4>
<div class="desc">
{!! strip_tags($item->text) !!}
</div>
</div>
@endif
@endif
@endforeach
</div>
<div class="col-lg-5 col-lg-offset-2 col-md-6 quofrm1 secpaddlf">
<img src = "{{ asset($whyChooseUs->cover_photo) }}">
</div>
</div> </div>
<div class="col-lg-5 col-lg-offset-2 col-md-6 quofrm1 secpaddlf">
<img src = "{{ asset($whyChooseUs->cover_photo) }}">
</div>
</div>
</div> </div>
</section> </section>
<!--why choose us end --> <!--why choose us end -->

View File

@ -69,23 +69,25 @@
<div class="row"> <div class="row">
@if ($service->children->isNotEmpty()) @if ($service->children->isNotEmpty())
@foreach ($service->children->take(2) as $child) @foreach ($service->children as $child)
<div class="col-sm-6"> @if (!empty($child->icon))
<div class="fh-service-box-2 box-style-1 no-thumb"> <div class="col-sm-6">
<div class="box-thumb"></div> <div class="fh-service-box-2 box-style-1 no-thumb">
<div class="box-wrapper"> <div class="box-thumb"></div>
<div class="box-header clearfix"><span class="fh-icon"><i <div class="box-wrapper">
class="{{ $child->icon }}"></i></span> <div class="box-header clearfix"><span class="fh-icon"><i
<h4 class="box-title">{{ $child->title }}</h4><span class="{{ $child->icon }}"></i></span>
class="sub-title main-color">Top Line Cargo </span> <h4 class="box-title">{{ $child->title }}</h4><span
</div> class="sub-title main-color">Top Line Cargo </span>
<div class="box-content"> </div>
<p>{!! $child->text !!}</p> <div class="box-content">
<p>{!! $child->text !!}</p>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> @endif
@endforeach @endforeach
@endif @endif
</div> </div>
@ -96,21 +98,23 @@
<div class="servdtlaccord margbtm40"> <div class="servdtlaccord margbtm40">
<div class="panel-group" id="accordion"> <div class="panel-group" id="accordion">
@forelse ($service->children->skip(2) as $id=>$child) @forelse ($service->children as $id=>$child)
<div class="panel panel-default"> @if (empty($child->icon))
<div class="panel-heading active-panel"> <div class="panel panel-default">
<h4 class="panel-title"> <div class="panel-heading active-panel">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" <h4 class="panel-title">
href="#collapse{{$id}}"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion"
{{$child->title}} href="#collapse{{$id}}">
</a> {{$child->title}}
</h4> </a>
</h4>
</div>
<div id="collapse{{$id}}" class="panel-collapse collapse in">
<div class="panel-body">
{!!$child->text!!}</div>
</div>
</div> </div>
<div id="collapse{{$id}}" class="panel-collapse collapse in"> @endif
<div class="panel-body">
{!!$child->text!!}</div>
</div>
</div>
@empty @empty
@endforelse @endforelse

View File

@ -73,7 +73,7 @@
</div> </div>
<div class="team-info"> <div class="team-info">
<h4 class="name">{{ $team->title }}</h4> <h4 class="name">{{ $team->title }}</h4>
<span class="job">{{ $team->destination }}</span> <span class="job">{{ $team->designation }}</span>
</div> </div>
</div> </div>
@empty @empty

File diff suppressed because it is too large Load Diff