set my courses module 1

This commit is contained in:
imadhigp 2026-08-24 17:11:18 +05:30
parent 5a9580a568
commit 8c953d0e46
7 changed files with 335 additions and 376 deletions

View File

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Auth;
class MyCoursesController extends Controller
{
public function showMyCourses()
{
$userId = session('student_portal_log_id')
?? session('student_id')
?? session('id')
?? Auth::id();
$student = DB::table('student_details')
->where('student_portal_log_id', $userId)
->orWhere('id', $userId)
->orWhere('student_id', $userId)
->first();
if (!$student) {
return view('mycourse', [
'courses' => collect([]),
'student' => null
]);
}
$courses = DB::table('courses')
->join('course_assign_student', 'courses.id', '=', 'course_assign_student.course_id')
->whereIn('course_assign_student.student_id', [
$student->id,
$student->student_id,
$student->student_portal_log_id
])
->select('courses.*', 'course_assign_student.assigned_at')
->distinct()
->get();
return view('mycourse', compact('courses', 'student'));
}
public function showModule($course_id)
{
$course = DB::table('courses')->where('id', $course_id)->first();
if (!$course) {
abort(404, 'Course not found');
}
$modules = DB::table('modules')
->where('course_id', $course_id)
->get();
return view('module', compact('course', 'modules'));
}
}

View File

@ -5,6 +5,10 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use App\Models\CourseAssignStudent;
use App\Models\Course;
use App\Models\studentDetails;
use Illuminate\Support\Facades\Schema;
class adminmycoursesController extends Controller class adminmycoursesController extends Controller
{ {
@ -25,7 +29,10 @@ class adminmycoursesController extends Controller
->get(); ->get();
} }
return view('admin.adminmycourses', compact('courses')); // Needed for the "Assign Course to Students" modal on this page
$students = studentDetails::all();
return view('admin.adminmycourses', compact('courses', 'students'));
} }
// --- COURSE CRUD METHODS --- // --- COURSE CRUD METHODS ---
@ -69,7 +76,7 @@ class adminmycoursesController extends Controller
} }
public function update(Request $request, $id) public function update(Request $request, $id)
{ {
$request->validate([ $request->validate([
'title' => 'required|string|max:255', 'title' => 'required|string|max:255',
'course_code' => 'required|string|max:50', 'course_code' => 'required|string|max:50',
@ -99,9 +106,7 @@ class adminmycoursesController extends Controller
'image' => $imagePath, 'image' => $imagePath,
'duration' => $request->duration, 'duration' => $request->duration,
'level' => $request->level, 'level' => $request->level,
'author' => $request->author ?? $course->author ?? 'Admin', 'author' => $request->author ?? $course->author ?? 'Admin',
'desc' => $request->desc ?? $request->description ?? $course->desc, 'desc' => $request->desc ?? $request->description ?? $course->desc,
'badge' => $request->badge ?? $course->badge, 'badge' => $request->badge ?? $course->badge,
'trending' => $request->has('trending') ? 1 : 0, 'trending' => $request->has('trending') ? 1 : 0,
@ -110,8 +115,7 @@ class adminmycoursesController extends Controller
]); ]);
return redirect()->back()->with('success', 'Course updated successfully!'); return redirect()->back()->with('success', 'Course updated successfully!');
} }
public function destroy($id) public function destroy($id)
{ {
@ -186,4 +190,42 @@ class adminmycoursesController extends Controller
DB::table('course_modules')->where('id', $id)->delete(); DB::table('course_modules')->where('id', $id)->delete();
return redirect()->back()->with('success', 'Module deleted successfully!'); return redirect()->back()->with('success', 'Module deleted successfully!');
} }
// --- ASSIGN COURSE TO STUDENTS ---
/**
* Handles the POST from the "Assign Course to Students" modal.
* Route name: assign.course
*/
public function assignCourse(Request $request)
{
$request->validate([
'course_id' => 'required|exists:courses,id',
'student_ids' => 'required|array|min:1',
'student_ids.*' => 'exists:student_details,id',
]);
foreach ($request->student_ids as $studentId) {
CourseAssignStudent::updateOrCreate(
[
'course_id' => $request->course_id,
'student_id' => $studentId,
]
);
// CourseAssignStudent::updateOrCreate(
// [
// 'course_id' => $request->course_id,
// 'student_id' => $studentId,
// ],
// [
// 'assigned_at' => now(),
// ]
// );
}
return redirect()->back()->with('success', 'Course assigned to selected students successfully!');
}
} }
Schema::getColumnListing('course_assign_student');

View File

@ -14,8 +14,9 @@ class CourseAssignStudent extends Model
// Mass assignable attributes // Mass assignable attributes
protected $fillable = [ protected $fillable = [
'student_details_id', 'student_id',
'course_id', 'course_id',
'assigned_at',
]; ];
/** /**
@ -23,7 +24,7 @@ class CourseAssignStudent extends Model
*/ */
public function studentDetail() public function studentDetail()
{ {
return $this->belongsTo(StudentDetail::class, 'student_details_id'); return $this->belongsTo(StudentDetail::class, 'student_id');
} }
/** /**

View File

@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('course_assign_student', function (Blueprint $table) {
$table->foreignId('student_id')->constrained('student_details')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('course_assign_student', function (Blueprint $table) {
$table->dropForeign(['student_id']);
$table->dropColumn('student_id');
});
}
};

View File

@ -508,12 +508,14 @@
<div class="mb-3"> <div class="mb-3">
<label class="form-label">Semester</label> <label class="form-label">Semester</label>
<select name="semester" class="form-select" required> <select name="semester" class="form-select" required>
<option value="Semester 1">Semester 1</option> <option value="Semester 1.1">Semester 1.1</option>
<option value="Semester 2">Semester 2</option> <option value="Semester 1.2">Semester 1.2</option>
<option value="Semester 3">Semester 3</option> <option value="Semester 2.1">Semester 2.1</option>
<option value="Semester 4">Semester 4</option> <option value="Semester 2.2">Semester 2.2</option>
<option value="Year 1">Year 1</option> <option value="Semester 3.1">Semester 3.1</option>
<option value="Year 2">Year 2</option> <option value="Semester 3.2">Semester 3.2</option>
<option value="Semester 4.1">Semester 4.1</option>
<option value="Semester 4.2">Semester 4.2</option>
</select> </select>
</div> </div>
<div class="mb-3"> <div class="mb-3">
@ -554,8 +556,67 @@
</div> </div>
</div> </div>
</div> </div>
<!-- Assign Courses to Students -->
<div class="card border-0 shadow-sm rounded-3 mt-4">
<div class="card-body d-flex justify-content-between align-items-center">
<div>
<h5 class="fw-bold mb-1"><i class="fa-solid fa-user-graduate me-2 text-primary"></i>Assign Courses to Students</h5>
<p class="text-muted mb-0 small">Enroll one or more students into an existing course.</p>
</div>
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#assignCourseModal">
<i class="fa-solid fa-user-plus me-1"></i> Assign Course
</button>
</div>
</div>
</main> </main>
<!-- ASSIGN COURSE TO STUDENTS MODAL -->
<div class="modal fade" id="assignCourseModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header text-white" style="background-color: var(--theme-navy);">
<h5 class="modal-title fw-bold text-white"><i class="fa-solid fa-user-plus me-2"></i>Assign Course to Students</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
<!-- Route name: assign.course -->
<form action="{{ route('assign.course') }}" method="POST">
@csrf
<div class="modal-body">
<div class="mb-3">
<label class="form-label fw-bold">Select Course</label>
<select name="course_id" class="form-select" required>
<option value="" selected disabled>-- Choose Course --</option>
@foreach($courses as $course)
<option value="{{ $course->id }}">{{ $course->course_code }} - {{ $course->title }}</option>
@endforeach
</select>
</div>
<div class="mb-3">
<label class="form-label fw-bold">Select Student(s)</label>
<select name="student_ids[]" class="form-select" multiple size="8" required>
@forelse($students as $student)
<option value="{{ $student->id }}">{{ $student->full_name }} ({{ $student->student_id ?? $student->email }})</option>
@empty
<option value="" disabled>No students found</option>
@endforelse
</select>
<small class="text-muted">Hold Ctrl (Windows) / Cmd (Mac) to select multiple students.</small>
</div>
</div>
<div class="modal-footer bg-light">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary">
<i class="fa-solid fa-check me-1"></i> Assign Course
</button>
</div>
</form>
</div>
</div>
</div>
<!-- ADD NEW COURSE MODAL --> <!-- ADD NEW COURSE MODAL -->
<div class="modal fade" id="addCourseModal" tabindex="-1" aria-hidden="true"> <div class="modal fade" id="addCourseModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">

View File

@ -1,358 +1,108 @@
@extends('layouts.studentportalnav') @extends('layouts.studentportalnav')
@section('title', 'My Course') @section('title', 'Course Modules')
@section('content') @section('content')
<style> <style>
:root { :root {
--theme-navy: #2D355B; /* Primary Navy */ --theme-navy: #2D355B;
--theme-navy-dark: #1F2541; /* Dark Navy */ --theme-red: #822424;
--theme-red: #822424; /* Primary Accent Red */ --theme-red-hover: #df2c3e;
--theme-red-hover: #df2c3e; /* Red Hover */ --bg-light: #F6F6F6;
--theme-yellow: #FFEA85; /* Accent Yellow/Gold */
--bg-light: #F6F6F6; /* Page Background */
--white: #ffffff; --white: #ffffff;
} }
body { body { background: var(--bg-light); font-family: 'Segoe UI', sans-serif; }
background: var(--bg-light);
font-family: 'Segoe UI', sans-serif;
}
.main-portal-content { .module-header {
padding: 10px 5px; background: linear-gradient(135deg, #2B293F 0%, #94A6F959 100%);
min-height: 100vh; color: var(--white);
transition: all 0.3s ease;
}
/* Premium Hero Section */
.hero {
background: linear-gradient(135deg, #2B293F 0%, #94A6F959 100%) !important;
color: var(--white) !important;
border-radius: 16px; border-radius: 16px;
padding: 35px 30px; padding: 30px;
margin-bottom: 30px; margin-bottom: 25px;
box-shadow: 0 8px 25px rgba(31, 37, 65, 0.15);
position: relative;
overflow: hidden;
border-left: 5px solid var(--theme-red); border-left: 5px solid var(--theme-red);
} }
.hero::after {
content: '';
position: absolute;
top: -30%;
right: -10%;
width: 350px;
height: 350px;
background: rgba(255, 255, 255, 0.04);
border-radius: 50%;
pointer-events: none;
}
/* Course Card */
.course-card {
border: 1px solid #e2e8f0 !important;
border-radius: 16px !important;
overflow: hidden;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
background: var(--white);
margin-bottom: 30px;
}
.course-card img {
height: 240px;
object-fit: cover;
width: 100%;
}
/* Sidebar Info Boxes */
.info-box {
border-radius: 12px !important;
padding: 20px 24px;
background: var(--white);
box-shadow: 0 4px 12px rgba(219, 240, 99, 0.04) !important;
border: 1px solid #e2e8f0 !important;
transition: all 0.3s ease;
}
.info-box:hover {
transform: translateY(-3px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
border-color: var(--theme-navy) !important;
}
.stat-icon {
width: 48px;
height: 48px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10px;
font-size: 18px;
background: var(--theme-red) !important;
color: #ffff8d;
}
/* Modules Card */
.module-card { .module-card {
border: 1px solid #e2e8f0 !important; border: 1px solid #e2e8f0;
border-radius: 14px !important; border-radius: 12px;
transition: all 0.3s ease;
background: var(--white); background: var(--white);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important; box-shadow: 0 4px 10px rgba(0,0,0,0.04);
transition: all 0.3s ease;
} }
.module-card:hover { .module-card:hover {
transform: translateY(-4px); transform: translateY(-2px);
box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08) !important; border-color: var(--theme-navy);
border-color: var(--theme-red) !important;
} }
/* Progress bar customizations */ .semester-badge {
.progress { background-color: var(--theme-navy);
height: 10px !important; color: #fff;
border-radius: 50px !important; font-size: 12px;
background-color: #e2e8f0 !important; padding: 5px 12px;
} border-radius: 20px;
.progress-bar {
border-radius: 50px !important;
background: linear-gradient(90deg, var(--theme-red), var(--theme-red-hover)) !important;
}
/* Status Badges */
.status {
font-size: 11px;
font-weight: 700;
padding: 6px 14px;
border-radius: 50px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.completed { background: rgba(45, 53, 91, 0.12); color: var(--theme-navy); }
.progressing { background: rgba(247, 63, 82, 0.15); color: var(--theme-red); }
.locked { background: #e2e8f0; color: #64748b; }
/* Custom Buttons */
.btn-theme-red {
background-color: var(--theme-red) !important;
border-color: var(--theme-red) !important;
color: #fff !important;
border-radius: 8px;
font-weight: 600;
transition: all 0.2s ease;
}
.btn-theme-red:hover {
background-color: var(--theme-red-hover) !important;
border-color: var(--theme-red-hover) !important;
}
.btn-theme-navy {
background-color: var(--theme-navy) !important;
border-color: var(--theme-navy) !important;
color: #fff !important;
border-radius: 8px;
font-weight: 600;
transition: all 0.2s ease;
}
.btn-theme-navy:hover {
background-color: var(--theme-navy-dark) !important;
}
.btn-continue {
background-color: var(--theme-red) !important;
color: #ffffff !important;
border-radius: 8px;
transition: all 0.2s ease;
}
.btn-continue:hover {
background-color: var(--theme-red-hover) !important;
}
/* Section Title Indicator */
.section-title-wrapper {
display: flex;
align-items: center;
gap: 10px;
margin: 30px 0 20px;
}
.section-title-wrapper::before {
content: '';
display: inline-block;
width: 5px;
height: 24px;
background-color: var(--theme-red);
border-radius: 2px;
}
@media (min-width: 768px) {
.main-portal-content { padding: 10px; }
.hero { padding: 40px; }
.course-card img { height: 280px; }
} }
</style> </style>
<div class="main-portal-content"> <div class="main-portal-content p-3">
<div class="container-fluid"> <div class="container-fluid">
@if($course) <!-- Back Button -->
<a href="{{ route('mycourse') }}" class="btn btn-outline-secondary btn-sm mb-3">
<i class="fa fa-arrow-left me-1"></i> Back to My Courses
</a>
{{-- Dynamic Image URL Handler --}} <!-- Course Header -->
@php <div class="module-header">
$imageSrc = Str::startsWith($course->image, ['http://', 'https://']) <h2 class="fw-bold mb-1">{{ $course->title ?? $course->name ?? 'Course Modules' }}</h2>
? $course->image <p class="mb-0 opacity-75">{{ $course->course_code ?? '' }} {{ isset($course->desc) ? '| '.$course->desc : '' }}</p>
: asset('storage/' . $course->image); </div>
@endphp
<!-- Hero Section --> <h4 class="fw-bold mb-4" style="color: var(--theme-navy);">Modules List</h4>
<div class="hero">
<div class="row align-items-center"> @if(isset($modules) && count($modules) > 0)
<div class="col-lg-9 col-md-8 text-start"> <div class="row g-3">
<h1 class="fw-bold display-6 mb-2">{{ $course->title }}</h1> @foreach($modules as $index => $module)
<p class="lead mb-4 small opacity-75">Welcome back! Continue your learning journey and complete all modules.</p> <div class="col-12">
<a href="#" class="btn btn-continue px-4 py-2 fw-semibold shadow-sm"> <div class="card module-card p-4">
<i class="fa fa-play me-2"></i> Continue Learning <div class="d-flex justify-content-between align-items-start flex-wrap gap-2">
<div>
@if(!empty($module->semester))
<span class="semester-badge mb-2 d-inline-block">
Semester {{ $module->semester }}
</span>
@endif
<h5 class="fw-bold text-dark mb-2">
Module {{ $index + 1 }}: {{ $module->title }}
</h5>
<p class="text-muted small mb-0">
{{ $module->description ?? 'No description provided.' }}
</p>
</div>
<div>
<a href="#" class="btn btn-sm text-white px-3 py-2" style="background-color: var(--theme-red); border-radius: 6px;">
View Content <i class="fa fa-chevron-right ms-1"></i>
</a> </a>
</div> </div>
<div class="col-lg-3 col-md-4 text-center d-none d-md-block">
<i class="fa-solid fa-graduation-cap" style="font-size: 140px; opacity: 0.35; color: #8C080F;"></i>
</div> </div>
</div> </div>
</div> </div>
@endforeach
<!-- Main Content Grid -->
<div class="row g-4">
<!-- LEFT COLUMN: Course details & Modules -->
<div class="col-lg-8 col-12">
<!-- Main Course Card -->
<div class="card course-card">
<img src="{{ $imageSrc }}" alt="{{ $course->title }}" onerror="this.onerror=null;this.src='https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?auto=format&fit=crop&w=1200&q=80';">
<div class="card-body p-4">
<div class="d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3">
<div>
<h3 class="fw-bold mb-1" style="color: var(--theme-navy);">{{ $course->course_code ?? $course->title }}</h3>
<p class="text-muted small mb-0">
<i class="fa-solid fa-user me-1" style="color: var(--theme-red);"></i> {{ $course->author ?? 'Instructor' }}
</p>
</div> </div>
<span class="badge px-3 py-2 rounded-pill" style="background-color: var(--theme-navy); color: var(--theme-yellow);">
{{ $course->badge ?? 'Active Course' }}
</span>
</div>
<p class="text-secondary small lh-base">
{{ $course->desc ?? 'No description available for this course.' }}
</p>
<div class="mt-4">
<div class="d-flex justify-content-between mb-2 small">
<span class="fw-semibold" style="color: var(--theme-navy);">Overall Progress</span>
<span class="fw-bold" style="color: var(--theme-red);">0%</span>
</div>
<div class="progress">
<div class="progress-bar" style="width:0%"></div>
</div>
</div>
</div>
</div>
<!-- Modules Header -->
<div class="section-title-wrapper">
<h4 class="fw-bold mb-0" style="color: var(--theme-navy);">
Course Modules
</h4>
</div>
<!-- Modules Sub-Grid (Sample Modules Interface) -->
<div class="row g-4">
<div class="col-md-6 col-12">
<div class="card module-card h-100">
<div class="card-body p-4 d-flex flex-column justify-content-between">
<div>
<div class="d-flex justify-content-between align-items-start gap-2 mb-2">
<h6 class="fw-bold mb-0" style="color: var(--theme-navy);">Introduction & Fundamentals</h6>
<span class="status progressing">In Progress</span>
</div>
<p class="text-muted small mb-0">Basic concepts and core theories.</p>
</div>
<div class="mt-4">
<button type="button" onclick="goToModule(1)" class="btn btn-theme-red w-100 btn-sm py-2">
Continue Learning
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- RIGHT COLUMN: Sidebar Statistics -->
<div class="col-lg-4 col-12">
<div class="row g-3">
<div class="col-12">
<div class="info-box d-flex align-items-center">
<div class="stat-icon"><i class="fa fa-layer-group"></i></div>
<div class="ms-3">
<h5 class="fw-bold mb-0" style="color: var(--theme-navy);">{{ $course->level ?? 'General' }}</h5>
<span class="text-muted small">Course Level</span>
</div>
</div>
</div>
<div class="col-12">
<div class="info-box d-flex align-items-center">
<div class="stat-icon"><i class="fa fa-clock"></i></div>
<div class="ms-3">
<h5 class="fw-bold mb-0" style="color: var(--theme-navy);">{{ $course->duration ?? 'N/A' }}</h5>
<span class="text-muted small">Course Duration</span>
</div>
</div>
</div>
<div class="col-12">
<div class="info-box d-flex align-items-center">
<div class="stat-icon"><i class="fa fa-award"></i></div>
<div class="ms-3">
<h5 class="fw-bold mb-0" style="color: var(--theme-navy);">{{ $course->status ?? 'Enrolled' }}</h5>
<span class="text-muted small">Status</span>
</div>
</div>
</div>
</div>
</div>
</div> <!-- End Row -->
@else @else
<!-- Empty State -->
<!-- Empty State: When no course is assigned --> <div class="bg-white p-5 text-center rounded-3 border">
<div class="row justify-content-center py-5"> <i class="fas fa-book-open fa-3x text-muted mb-3"></i>
<div class="col-md-8 text-center"> <h5 class="fw-bold">No Modules Found</h5>
<div class="p-5 rounded-4 shadow-sm bg-white border"> <p class="text-muted mb-0">There are no modules found for this course.</p>
<i class="fas fa-graduation-cap fa-4x text-muted mb-3"></i>
<h3 class="fw-bold text-dark mb-2">No Assigned Course Found</h3>
<p class="text-muted mb-0">You do not have any course assigned to your profile yet. Please contact the administration for assistance.</p>
</div> </div>
</div>
</div>
@endif @endif
</div> </div>
</div> </div>
<script>
function goToModule(moduleId) {
window.location.href = "{{ url('/module') }}/" + moduleId;
}
</script>
@endsection @endsection

View File

@ -20,7 +20,7 @@ use App\Http\Controllers\AdminTimetableController;
use App\Http\Controllers\AdminDashboardController; use App\Http\Controllers\AdminDashboardController;
use App\Http\Controllers\welcomeController; use App\Http\Controllers\welcomeController;
use App\Http\Controllers\DocumentDownloadController; use App\Http\Controllers\DocumentDownloadController;
use App\Http\Controllers\MyCoursesController;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Public Routes & General Pages | Public Routes & General Pages
@ -117,6 +117,14 @@ Route::middleware(['web'])->group(function () {
Route::get('/mycourse', [CoureseAssignController::class, 'showMyCourse'])->name('mycourse'); Route::get('/mycourse', [CoureseAssignController::class, 'showMyCourse'])->name('mycourse');
Route::get('/module/{id}', [CoureseAssignController::class, 'showModule'])->name('module.show'); Route::get('/module/{id}', [CoureseAssignController::class, 'showModule'])->name('module.show');
Route::get('/mycourse', [MyCoursesController::class, 'showMyCourses'])->name('mycourse');
Route::get('/course/{course_id}/modules', [MyCoursesController::class, 'showModule'])->name('course.modules');
Route::get('/mycourse', [MyCoursesController::class, 'showMyCourses'])->name('mycourse');
// Route::get('/module/{course_id}', [MyCoursesController::class, 'showModule'])->name('course.modules');
/* Document Downloads */ /* Document Downloads */
Route::get('/student/download/calendar', [DocumentDownloadController::class, 'downloadAcademicCalendar'])->name('student.download.calendar'); Route::get('/student/download/calendar', [DocumentDownloadController::class, 'downloadAcademicCalendar'])->name('student.download.calendar');
Route::get('/student/download/handbook', [DocumentDownloadController::class, 'downloadStudentHandbook'])->name('student.download.handbook'); Route::get('/student/download/handbook', [DocumentDownloadController::class, 'downloadStudentHandbook'])->name('student.download.handbook');
@ -165,6 +173,8 @@ Route::middleware(['web'])->prefix('admin')->group(function () {
Route::post('/adminmycourses/store', [adminmycoursesController::class, 'store'])->name('admin.courses.store'); Route::post('/adminmycourses/store', [adminmycoursesController::class, 'store'])->name('admin.courses.store');
Route::post('/adminmycourses/update/{id}', [adminmycoursesController::class, 'update'])->name('admin.courses.update'); Route::post('/adminmycourses/update/{id}', [adminmycoursesController::class, 'update'])->name('admin.courses.update');
Route::delete('/courses/{id}', [adminmycoursesController::class, 'destroy'])->name('admin.courses.delete'); Route::delete('/courses/{id}', [adminmycoursesController::class, 'destroy'])->name('admin.courses.delete');
Route::post('/admin/assign-course', [adminmycoursesController::class, 'assignCourse'])
->name('assign.course');
// Admin Timetable Routes // Admin Timetable Routes
Route::get('/timetable', [AdminTimetableController::class, 'index'])->name('admin.timetable'); Route::get('/timetable', [AdminTimetableController::class, 'index'])->name('admin.timetable');