@extends('layouts.frontapp') @section('title', 'Home') @section('content') @php function banners(){ $result=DB::table('banner_images')->where('status','1')->where('is_delete','0')->get(); return isset($result)?$result:''; } function banner_one(){ $result=DB::table('special_offers')->where('status','1')->where('position','1')->first(); return isset($result)?$result:''; } function banner_two(){ $result=DB::table('special_offers')->where('status','1')->where('position','2')->first(); return isset($result)?$result:''; } function ad_one(){ $result=DB::table('special_offers')->where('status','1')->where('position','3')->first(); return isset($result)?$result:''; } function ad_two(){ $result=DB::table('special_offers')->where('status','1')->where('position','5')->first(); return isset($result)?$result:''; } function products_with_tag(){ $result=DB::table('products')->where('status','1')->where('is_delete','0')->where('tag_id','!=','')->groupBy('tag_id')->limit('3')->get(); return isset($result)?$result:''; } function new_products(){ $result=DB::table('products')->where('status','1')->where('is_delete','0')->orderBy(DB::raw('RAND()'))->limit('15')->get(); return isset($result)?$result:''; } function top_products(){ $result=DB::table('products')->where('status','1')->where('is_delete','0')->orderBy(DB::raw('RAND()'))->limit('15')->get(); return isset($result)?$result:''; } function currency(){ $result=DB::table('membership_currency')->where('status','Active')->first(); return isset($result->currency_symbol)?$result->currency_symbol:''; } function tagname($id){ $result=DB::table('product_tags')->where('status','1')->where('id',$id)->first(); return isset($result->tag_name)?$result->tag_name:''; } $banner_one = banner_one(); $banner_two = banner_two(); $ad_one = ad_one(); $ad_two = ad_two(); $banners = banners(); $new_products = new_products(); $top_products = top_products(); @endphp
@if(isset($ad_one))
@endif
TOP WORKOUT PLANS

Workout Plans

NAIL BIG LIFTS WITH 4 FULL-VIDEO WORKOUTS

Exercises Focused on Squats, Bench & Deadlifts

MINIMAL EQUIPMENT, MAXUMUM RESULTS

Integrating Bodyweight, Cardio & Resistance Movements

30 FOLLOW-ALONG VIDEOS

PLUS 6 Video Recipes To Build Muscle & Lose Weight

FOLLOW-ALONG VIDEO WORKOUTS

Melt Away Fat with Supplement Guidance & Nutrition Planning

TOP SELLERS

TOP SELLERS

@foreach($top_products as $key=>$item) @php $productimg=DB::table('product_images')->where('product_id',$item->id)->where('is_delete','0')->orderBy('id','ASC')->limit('2')->get()->toArray(); @endphp
@foreach($productimg as $key=>$img) @php $imgurl1 = url('/').'/uploads/product_images/'.$img->image_name; @endphp @endforeach @if(isset($item->tag_id) && $item->tag_id!=0)
{{tagname($item->tag_id)}}
@endif
@php $rating = 0; $overallrating=DB::table('product_reviews')->where("product_id",$item->id)->avg('rating'); $rating = $overallrating; @endphp

{{isset($item->product_name)?$item->product_name:''}}

{!!currency()!!} @if($item->product_type==3) {{number_format($item->product_price,2)}} @endif
@endforeach
NEW & HOT

NEW & HOT

@foreach($new_products as $key=>$item) @php $productimg=DB::table('product_images')->where('product_id',$item->id)->where('is_delete','0')->orderBy('id','ASC')->limit('2')->get()->toArray(); @endphp
@foreach($productimg as $key=>$img) @php $imgurl1 = url('/').'/uploads/product_images/'.$img->image_name; @endphp @endforeach @if(isset($item->tag_id) && $item->tag_id!=0)
{{tagname($item->tag_id)}}
@endif
@php $rating = 0; $overallrating=DB::table('product_reviews')->where("product_id",$item->id)->avg('rating'); $rating = $overallrating; @endphp

{{isset($item->product_name)?$item->product_name:''}}

{!!currency()!!} @if($item->product_type==3) {{number_format($item->product_price,2)}} @endif
@endforeach
@if(isset($ad_two))
@endif @endsection