merge issues
This commit is contained in:
commit
2313bf7cc9
@ -30,7 +30,6 @@ class WebsiteController extends Controller
|
||||
$this->path = config('app.client_path');
|
||||
$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();
|
||||
|
||||
$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();
|
||||
// dd($footerMenuItems);
|
||||
@ -89,7 +88,11 @@ class WebsiteController extends Controller
|
||||
$data["sliders"] = Sliders::where('status', 1)->latest()->get();
|
||||
$data["franchises"] = Franchises::latest()->take(4)->get();
|
||||
$data["testimonials"] = Testimonials::where('status', 1)->latest()->get();
|
||||
<<<<<<< HEAD
|
||||
$data['services'] = Services::take(6)->get();
|
||||
=======
|
||||
$data['services'] = Services::latest()->where('parent_service',null)->take(6)->get();
|
||||
>>>>>>> 9fa6a5d79720007756721d82c4fde70e31a0f1f1
|
||||
$data['partners'] = Partners::latest()->get();
|
||||
$data["news"] = News::latest()->take(6)->get();
|
||||
|
||||
@ -172,7 +175,7 @@ class WebsiteController extends Controller
|
||||
->orWhere('parent_service', 0)
|
||||
->select(['title', 'alias'])
|
||||
->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'));
|
||||
}
|
||||
|
||||
@ -201,8 +204,7 @@ class WebsiteController extends Controller
|
||||
'message' => 'required|min:10',
|
||||
'phone' => 'required|string|regex:/^98\d{8}$/',
|
||||
]);
|
||||
|
||||
$sent = Mail::to('sm.bibhuti@gmail.com')->send(new ContactMail($validated));
|
||||
$sent = Mail::to(SITEVARS->email)->send(new ContactMail($validated));
|
||||
|
||||
if ($sent) {
|
||||
return response()->json(['success' => 'Email sent successfully']);
|
||||
@ -221,7 +223,7 @@ class WebsiteController extends Controller
|
||||
'freightType' => 'required|array',
|
||||
'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) {
|
||||
return response()->json(['success' => 'Email sent successfully']);
|
||||
} else {
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Scopes\StatusScope;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
@ -49,4 +50,9 @@ class News extends Model
|
||||
get: fn($value) => User::find($value) ? User::find($value)->name : '',
|
||||
);
|
||||
}
|
||||
|
||||
public static function boot(){
|
||||
parent::boot();
|
||||
static::addGlobalScope(new StatusScope());
|
||||
}
|
||||
}
|
18
app/Models/Scopes/StatusScope.php
Normal file
18
app/Models/Scopes/StatusScope.php
Normal 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);
|
||||
}
|
||||
}
|
@ -76,7 +76,7 @@
|
||||
</ul>
|
||||
</li>
|
||||
@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
|
||||
@endforeach
|
||||
</ul>
|
||||
|
@ -34,27 +34,21 @@
|
||||
|
||||
<!-- 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"
|
||||
id="slide-1-layer-1" data-x="['left','left','left','left']"
|
||||
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-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-textAlign="['inherit','inherit','inherit','inherit']" data-paddingtop="[0,0,0,0]"
|
||||
data-paddingright="[0,0,0,0]" data-paddingbottom="[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 }}
|
||||
</div>
|
||||
|
||||
@ -62,7 +56,7 @@
|
||||
<!-- LAYER NR. 4 -->
|
||||
<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-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-width="none" data-height="none" data-whitespace="normal" data-type="text"
|
||||
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>
|
||||
@endforeach
|
||||
|
||||
|
@ -7,37 +7,41 @@
|
||||
<h2>{{ $whyChooseUs->title }}?</h2>
|
||||
</div>
|
||||
@foreach ($whyChooseUs->children as $item)
|
||||
@if($item->status != -1)
|
||||
<div class="fh-icon-box style-2 icon-left has-line">
|
||||
@if ($item->status != -1)
|
||||
@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
|
||||
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>
|
||||
<div class="desc">
|
||||
{!! strip_tags($item->text) !!}
|
||||
</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>
|
||||
@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 class="col-lg-5 col-lg-offset-2 col-md-6 quofrm1 secpaddlf">
|
||||
<img src = "{{ asset($whyChooseUs->cover_photo) }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--why choose us end -->
|
||||
|
@ -69,23 +69,25 @@
|
||||
|
||||
<div class="row">
|
||||
@if ($service->children->isNotEmpty())
|
||||
@foreach ($service->children->take(2) as $child)
|
||||
<div class="col-sm-6">
|
||||
<div class="fh-service-box-2 box-style-1 no-thumb">
|
||||
<div class="box-thumb"></div>
|
||||
<div class="box-wrapper">
|
||||
<div class="box-header clearfix"><span class="fh-icon"><i
|
||||
class="{{ $child->icon }}"></i></span>
|
||||
<h4 class="box-title">{{ $child->title }}</h4><span
|
||||
class="sub-title main-color">Top Line Cargo </span>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<p>{!! $child->text !!}</p>
|
||||
@foreach ($service->children as $child)
|
||||
@if (!empty($child->icon))
|
||||
<div class="col-sm-6">
|
||||
<div class="fh-service-box-2 box-style-1 no-thumb">
|
||||
<div class="box-thumb"></div>
|
||||
<div class="box-wrapper">
|
||||
<div class="box-header clearfix"><span class="fh-icon"><i
|
||||
class="{{ $child->icon }}"></i></span>
|
||||
<h4 class="box-title">{{ $child->title }}</h4><span
|
||||
class="sub-title main-color">Top Line Cargo </span>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<p>{!! $child->text !!}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
@ -96,21 +98,23 @@
|
||||
|
||||
<div class="servdtlaccord margbtm40">
|
||||
<div class="panel-group" id="accordion">
|
||||
@forelse ($service->children->skip(2) as $id=>$child)
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading active-panel">
|
||||
<h4 class="panel-title">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion"
|
||||
href="#collapse{{$id}}">
|
||||
{{$child->title}}
|
||||
</a>
|
||||
</h4>
|
||||
@forelse ($service->children as $id=>$child)
|
||||
@if (empty($child->icon))
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading active-panel">
|
||||
<h4 class="panel-title">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion"
|
||||
href="#collapse{{$id}}">
|
||||
{{$child->title}}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse{{$id}}" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
{!!$child->text!!}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapse{{$id}}" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
{!!$child->text!!}</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@empty
|
||||
@endforelse
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
||||
</div>
|
||||
<div class="team-info">
|
||||
<h4 class="name">{{ $team->title }}</h4>
|
||||
<span class="job">{{ $team->destination }}</span>
|
||||
<span class="job">{{ $team->designation }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user