diff --git a/app/Http/Controllers/Backend/Courses/CourseController.php b/app/Http/Controllers/Backend/Courses/CourseController.php index 238e8e4..a841094 100644 --- a/app/Http/Controllers/Backend/Courses/CourseController.php +++ b/app/Http/Controllers/Backend/Courses/CourseController.php @@ -1,6 +1,6 @@ $course->price, "old_price" => $course->old_price, "image" => $course->image, + "difficulty" => $course->difficulty, "instructor" => $course->instructor ? $course->instructor->name_en : 'Unknown Instructor', ]; } @@ -43,28 +44,6 @@ public function addToCart($id) return redirect()->back()->with('success', 'Product added to cart successfully!'); } - public function update(Request $request) - { - if ($request->id && $request->quantity) { - $cart = session()->get('cart'); - $cart[$request->id]["quantity"] = $request->quantity; - session()->put('cart', $cart); - session()->flash('success', 'Cart updated successfully'); - } - } - - // public function remove(Request $request) - // { - // if ($request->id) { - // $cart = session()->get('cart'); - // if (isset($cart[$request->id])) { - // unset($cart[$request->id]); - // session()->put('cart', $cart); - // } - // session()->flash('success', 'Product removed successfully'); - // } - // } - public function remove(Request $request) { if ($request->id) { @@ -73,9 +52,7 @@ public function remove(Request $request) unset($cart[$request->id]); session()->put('cart', $cart); } - return response()->json(['success' => true], 200); + session()->flash('success', 'Product removed successfully'); } - return response()->json(['error' => 'Invalid request'], 400); } - } diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php new file mode 100644 index 0000000..e05a657 --- /dev/null +++ b/app/Http/Controllers/HomeController.php @@ -0,0 +1,20 @@ + -
-
- -
+ +
+
+
- +
+ - -
-
-
-
-
2 Courses in Cart
- @php $total = 0 @endphp - @if (session('cart')) - @foreach (session('cart') as $id => $details) - @php $total += $details['price'] * $details['quantity'] @endphp -
-
- course image -
-
-
{{ $details['title_en'] }}
-

By {{ $details['instructor'] }}

-
-

- {{ $details['price'] ? '$' . $details['price'] : 'Free' }} - {{ $details['old_price'] ? '$' . $details['old_price'] : '' }} -

-
- - - -
-
-
-
- @endforeach - @endif -
-
-
Summery
-
-
-
Subtotal
-

{{ '$' . number_format((float) $total, 2) }}

-
-
-
Coupon Discount
-

0.00%

-
-
-
taxes
-

0.00

-
-
-
Total:
-

{{ '$' . number_format((float) $total, 2) }}

-
-
- Checkout - -
- - -
-
+ +
+
+
+
+
{{count(session('cart', []))}} Courses in Cart
+ @php $total = 0 @endphp + @if (session('cart')) + @foreach (session('cart') as $id => $details) + @php $total += $details['price'] * $details['quantity'] @endphp +
+
+ course image
+
+
{{$details['title_en']}} +
+

By {{$details['instructor']}}

+
+

+ {{$details['price'] ? '$' . $details['price'] : 'Free'}} + {{$details['old_price'] ? '$' . $details['old_price'] : ''}} +

+
+ + + +
+
+
+
+ @endforeach + @endif +
+
+
Summery
+
+
+
Subtotal
+

{{'$' . number_format((float) $total, 2)}}

+
+
+
Coupon Discount
+

0.00%

+
+
+
Taxes
+

0.00

+
+
+
Total:
+

{{'$' . number_format((float) $total, 2)}}

+
+
+ Checkout + +
+ + +
+
-
- +
+
+ @endsection @push('scripts') - -@endpush + +@endpush \ No newline at end of file diff --git a/resources/views/frontend/checkout.blade.php b/resources/views/frontend/checkout.blade.php index c0ad889..4325c79 100644 --- a/resources/views/frontend/checkout.blade.php +++ b/resources/views/frontend/checkout.blade.php @@ -148,7 +148,7 @@
- Gamification: Motivation Psychology & The + Gamification: Motivation Psychology & The Art of Engagement.

by Kevin Gibert

@@ -164,7 +164,7 @@
- Digital Art for Beginners - Unleash Your + Digital Art for Beginners - Unleash Your Creativity

by Kevin Gibert

diff --git a/resources/views/frontend/courseDetails.blade.php b/resources/views/frontend/courseDetails.blade.php index a00b477..2971ee9 100644 --- a/resources/views/frontend/courseDetails.blade.php +++ b/resources/views/frontend/courseDetails.blade.php @@ -2318,10 +2318,10 @@ class="feather feather-star">

5 hours to remaining this price

- +
diff --git a/resources/views/frontend/home.blade.php b/resources/views/frontend/home.blade.php index 6ce494e..02f8c69 100644 --- a/resources/views/frontend/home.blade.php +++ b/resources/views/frontend/home.blade.php @@ -49,194 +49,25 @@ class="img-fluid" />

Browse Course with Top Categories

-
-
-
- - - - + @forelse ($category as $cat) +
+
+
+ +
+
+
+
{{$cat->category_name}}
+

587 Courses

-
-
Photography
-

587 Courses

-
-
-
-
-
- - - - - - -
-
-
-
Development
-

17k Courses

-
-
-
-
-
- - - - - - - -
-
-
-
Design
-

23k Courses

-
-
-
-
-
- - - - - -
-
-
-
Music
-

297 Courses

-
-
-
-
-
- - - - - - -
-
-
-
Marketing
-

2k Courses

-
-
-
-
-
- - - - - - - -
-
-
-
Design
-

23k Courses

-
-
-
-
-
- - - - - -
-
-
-
Music
-

297 Courses

-
-
-
-
-
- - - - - - -
-
-
-
Marketing
-

2k Courses

-
-
+ @empty + @endforelse
@@ -648,7 +479,7 @@ class="contentCard-user d-flex align-items-center">
@@ -829,7 +660,7 @@ class="contentCard-user d-flex align-items-center">
- Browse all + Browse all Courses
@@ -953,7 +784,7 @@ class="contentCard-user d-flex align-items-center">
- Browse all + Browse all Courses
@@ -1191,7 +1022,7 @@ class="contentCard-user d-flex align-items-center">
- Browse all + Browse all Courses
@@ -1258,7 +1089,7 @@ class="contentCard-user d-flex align-items-center">
- Browse all + Browse all Courses
@@ -1273,6 +1104,7 @@ class="img-fluid dot-06" /> +{{-- Why You'll Learn With Eduguard --}}

Why You'll Learn with Eduguard

@@ -1680,454 +1512,77 @@ class="img-fluid" />

Meet Our Best Instructor

-
-
- Mentor image - + @forelse ($instructor as $i) +
+ +
+
+ {{$i->name_en}} +
+

{{$i->designation}}

+
-
-
- Abram Philips -
-

Adobe Instructor

-
-
-
- -
-
- Abram Philips -
-

Adobe Instructor

-
-
-
- -
-
- Sheikh Rashed -
-

Adobe Instructor

-
-
-
- -
-
- Abram Philips -
-

Adobe Instructor

-
-
-
- -
-
Dev Taher
-

Adobe Instructor

-
-
-
- -
-
- Zakir Hossain -
-

Adobe Instructor

-
-
+ @empty + @endforelse
@@ -2151,128 +1606,40 @@ class="img-fluid shape01" />
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
-
-
- location + @forelse ($course as $c) +
+
+ images +
+
+
+ {{$c->title_en}} +
+
+
+
+ location +
+ Chicago, Illinois
- Chicago, Illinois -
-
-
- calendar +
+
+ calendar +
+ 29th jan, 2020
- 29th jan, 2020
-
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
-
-
- location -
- Chicago, Illinois -
-
-
- calendar -
- 29th jan, 2020 -
-
-
-
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
-
-
- location -
- Chicago, Illinois -
-
-
- calendar -
- 29th jan, 2020 -
-
-
-
-
-
- images -
-
-
- Chicago International - Conference on Education -
-
-
-
- location -
- Chicago, Illinois -
-
-
- calendar -
- 29th jan, 2020 -
-
-
-
+ @empty + @endforelse
diff --git a/resources/views/frontend/searchCourse.blade.php b/resources/views/frontend/searchCourse.blade.php index e742f6e..a220078 100644 --- a/resources/views/frontend/searchCourse.blade.php +++ b/resources/views/frontend/searchCourse.blade.php @@ -49,7 +49,7 @@
- +

- +

- +

- +

+
+ {{-- Filter by dropdown things--}}