<?php

namespace App\Http\Controllers\User;

use App\Http\Controllers\Controller;
use App\Models\CoursePage;
use Illuminate\Http\Request;

class UserCourseController extends Controller
{
    //Course Details View
    public function UserCourseView($id, $slug)
    {
        $course_details = CoursePage::find($id);
        return view('user.course.course_details', compact('course_details'));
    }

    //Course View Page
    public function UserCourse()
    {
        $courses = CoursePage::latest()->get();
        return view('user.course.course', compact('courses'));
    }
}
