diff --git a/app/Http/Controllers/Backend/Courses/CourseController.php b/app/Http/Controllers/Backend/Courses/CourseController.php index e60ccaf..7c94761 100644 --- a/app/Http/Controllers/Backend/Courses/CourseController.php +++ b/app/Http/Controllers/Backend/Courses/CourseController.php @@ -68,7 +68,7 @@ public function store(AddNewRequest $request) $course->prerequisites_en = $request->prerequisites_en; $course->prerequisites_bn = $request->prerequisites_bn; $course->thumbnail_video = $request->thumbnail_video; - $course->tag = $request->tag; + $course->tag = $request->tag; $course->status = $request->status; $course->language = 'en'; diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index e05a657..ae6a852 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -14,7 +14,8 @@ public function index() $course = Course::get(); $instructor = Instructor::get(); $category = CourseCategory::get(); - return view('frontend.home', compact('course', 'instructor', 'category')); + $popularCourses = Course::where('tag', 'popular')->get(); + return view('frontend.home', compact('course', 'instructor', 'category', 'popularCourses')); } } diff --git a/resources/views/frontend/home.blade.php b/resources/views/frontend/home.blade.php index 3394c1b..eadccc0 100644 --- a/resources/views/frontend/home.blade.php +++ b/resources/views/frontend/home.blade.php @@ -138,349 +138,60 @@ class="img-fluid shape-01" />
-
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
- - client-image -

Brandon Dias

-
-
- ৳12 - ৳95 -
+ @forelse ($popularCourses as $pc) +
+
+
+ images
-
-
-
- star +
+
+ {{$pc->title_en}} +
+
+ + client-image +

{{$pc?->instructor->name_en}}

+
+
+ {{$pc->price?'৳'.$pc->price:'Free'}} + {{$pc->old_price?'৳'.$pc->old_price:''}}
- 4.5
-
-
- eye +
+
+
+ star +
+ 4.5
- 24,517 -
-
-
- location +
+
+ eye +
+ 24,517
- 37 Lesson -
-
-
- clock +
+
+ location +
+ {{$pc->lesson?$pc->lesson:0}} Lesson +
+
+
+ clock +
+ {{$pc->duration?$pc->duration:0}} Hours
- 3 Hours
-
-
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
- - client-image -

Brandon Dias

-
-
- ৳12 - ৳95 -
-
-
-
-
- star -
- 4.5 -
-
-
- eye -
- 24,517 -
-
-
- location -
- 37 Lesson -
-
-
- clock -
- 3 Hours -
-
-
-
-
-
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
- - client-image -

Brandon Dias

-
-
- ৳12 - ৳95 -
-
-
-
-
- star -
- 4.5 -
-
-
- eye -
- 24,517 -
-
-
- location -
- 37 Lesson -
-
-
- clock -
- 3 Hours -
-
-
-
-
-
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
- - client-image -

Brandon Dias

-
-
- ৳12 - ৳95 -
-
-
-
-
- star -
- 4.5 -
-
-
- eye -
- 24,517 -
-
-
- location -
- 37 Lesson -
-
-
- clock -
- 3 Hours -
-
-
-
-
-
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
- - client-image -

Brandon Dias

-
-
- ৳12 - ৳95 -
-
-
-
-
- star -
- 4.5 -
-
-
- eye -
- 24,517 -
-
-
- location -
- 37 Lesson -
-
-
- clock -
- 3 Hours -
-
-
-
-
-
-
-
- - images - -
-
-
- Chicago International - Conference on Education -
-
- - client-image -

Brandon Dias

-
-
- ৳12 - ৳95 -
-
-
-
-
- star -
- 4.5 -
-
-
- eye -
- 24,517 -
-
-
- location -
- 37 Lesson -
-
-
- clock -
- 3 Hours -
-
-
-
-
+ @empty + + @endforelse
@@ -548,120 +259,6 @@ class="contentCard-user d-flex align-items-center">
-
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
- - client-image -

Brandon Dias

-
-
- ৳12 - ৳95 -
-
-
-
-
- star -
- 4.5 -
-
-
- eye -
- 24,517 -
-
-
- location -
- 37 Lesson -
-
-
- clock -
- 3 Hours -
-
-
-
-
-
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
- - client-image -

Brandon Dias

-
-
- ৳12 - ৳95 -
-
-
-
-
- star -
- 4.5 -
-
-
- eye -
- 24,517 -
-
-
- location -
- 37 Lesson -
-
-
- clock -
- 3 Hours -
-
-
-
-
@@ -729,63 +326,6 @@ class="contentCard-user d-flex align-items-center">
-
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
- - client-image -

Brandon Dias

-
-
- ৳12 - ৳95 -
-
-
-
-
- star -
- 4.5 -
-
-
- eye -
- 24,517 -
-
-
- location -
- 37 Lesson -
-
-
- clock -
- 3 Hours -
-
-
-
-
@@ -853,177 +393,6 @@ class="contentCard-user d-flex align-items-center">
-
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
- - client-image -

Brandon Dias

-
-
- ৳12 - ৳95 -
-
-
-
-
- star -
- 4.5 -
-
-
- eye -
- 24,517 -
-
-
- location -
- 37 Lesson -
-
-
- clock -
- 3 Hours -
-
-
-
-
-
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
- - client-image -

Brandon Dias

-
-
- ৳12 - ৳95 -
-
-
-
-
- star -
- 4.5 -
-
-
- eye -
- 24,517 -
-
-
- location -
- 37 Lesson -
-
-
- clock -
- 3 Hours -
-
-
-
-
-
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
- - client-image -

Brandon Dias

-
-
- ৳12 - ৳95 -
-
-
-
-
- star -
- 4.5 -
-
-
- eye -
- 24,517 -
-
-
- location -
- 37 Lesson -
-
-
- clock -
- 3 Hours -
-
-
-
-
@@ -1107,7 +476,7 @@ class="contentCard-user d-flex align-items-center"> class="img-fluid dot-06" /> Shape
- + {{-- Why You'll Learn With Eduguard --}}