@extends('layouts.default') @push('title', get_phrase('Home')) @push('meta')@endpush @push('css') @endpush @section('content')
@php $bannerData = json_decode(get_frontend_settings('banner_image')); $banneractive = get_frontend_settings('home_page'); if ($bannerData !== null && is_object($bannerData) && property_exists($bannerData, $banneractive)) { $banner = json_decode(get_frontend_settings('banner_image'))->$banneractive; } @endphp

{{ get_frontend_settings('banner_sub_title') }}

{{ get_phrase('Explore Courses') }}
@if (isset($banner)) @else @endif
    @php $students = DB::table('users')->where('role', 'student')->take(4)->get(); $total_student = DB::table('users')->where('role', 'student')->get(); $free_courses = DB::table('courses')->where('is_paid', 0)->get(); @endphp @foreach ($students as $student)
  • @endforeach

{{ count($total_student) }}+

{{ get_phrase('Participant') }}

{{ count($free_courses) }}+

{{ get_phrase('Online Free Courses') }}

{{ get_phrase('10%') }}

{{ get_phrase('Lessons for beginner') }}

{{ get_phrase('Featured Courses') }}

{{ get_phrase('Explore Courses') }}
@php $feature_courses = DB::table('courses')->where('status', 'active')->latest('id')->get(); @endphp @foreach ($feature_courses->take(8) as $key => $row)

{{ ucfirst($row->title) }}

@endforeach

{{ get_phrase('Top Course') }}

{{ get_phrase('See All Courses') }}
@php $top_courses = DB::table('courses') ->join('reviews', 'courses.id', '=', 'reviews.course_id') ->select('courses.*', DB::raw('COUNT(reviews.id) as review_count'), DB::raw('AVG(reviews.rating) as average_rating')) ->groupBy('courses.id') ->orderByDesc('review_count') ->take(6) ->get(); @endphp @foreach ($top_courses as $key => $row) @endforeach
@php $bigImage = json_decode(get_homepage_settings('meditation')); $settings = get_homepage_settings('meditation'); if (!$settings) { $settings = '{"meditation":[{"banner_title":"","banner_description":"", "image":""}]}'; } $meditation_text = json_decode($settings); $meditations = []; $maxkey = 0; if ($meditation_text && isset($meditation_text->meditation)) { $meditations = $meditation_text->meditation; $maxkey = count($meditations) > 0 ? max(array_keys((array) $meditations)) : 0; } @endphp

{{ get_phrase('The benefit of Yoga Expedition') }}

    @foreach ($meditations as $key => $slider) @if ($key % 2 == 0)
  • {{ $slider->banner_title }}

    {{ $slider->banner_description }}

  • @endif @endforeach
@if (isset($bigImage->big_image)) @endif
    @foreach ($meditations as $key => $slider) @if ($key % 2 != 0)
  • {{ $slider->banner_title }}

    {{ $slider->banner_description }}

  • @endif @endforeach
@if (get_frontend_settings('blog_visibility_on_the_home_page'))

{{ get_phrase('Blogs') }}

{{ get_phrase('See All Blogs') }}
@endif @endsection