forget password set
This commit is contained in:
parent
a03cfc0f40
commit
309934c18f
|
|
@ -34,28 +34,94 @@ public function studentlogin(Request $request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function showProfile(Request $request)
|
||||||
|
{
|
||||||
|
|
||||||
|
$log_id = $request->session()->get('student_log_id');
|
||||||
|
$student_code = $request->session()->get('student_id');
|
||||||
|
|
||||||
|
if (!$log_id && !$student_code) {
|
||||||
|
return redirect('/')->with('error', 'Please login first!');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$student = DB::table('student_details')
|
||||||
|
->where('student_portal_log_id', $log_id)
|
||||||
|
->orWhere('student_id', $student_code)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
|
||||||
|
if (!$student) {
|
||||||
|
return redirect()->back()->with('error', 'Student details not found in database!');
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('StudentProfile', compact('student'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// public function showProfile(Request $request)
|
||||||
|
// {
|
||||||
|
|
||||||
|
// $log_id = $request->session()->get('student_log_id');
|
||||||
|
// $student_code = $request->session()->get('student_id');
|
||||||
|
|
||||||
|
// if (!$log_id && !$student_code) {
|
||||||
|
// return redirect('/')->with('error', 'Please login first!');
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// $student = DB::table('student_details')
|
||||||
|
// ->where('student_portal_log_id', $log_id)
|
||||||
|
// ->orWhere('student_id', $student_code)
|
||||||
|
// ->first();
|
||||||
|
|
||||||
|
|
||||||
|
// if (!$student) {
|
||||||
|
// return redirect()->back()->with('error', 'Student details not found in database!');
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return view('StudentProfile', compact('student'));
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// public function showProfile(Request $request)
|
// public function showProfile(Request $request)
|
||||||
// {
|
// {
|
||||||
|
|
||||||
// $log_id = $request->session()->get('student_id');
|
// $log_id = $request->session()->get('student_id');
|
||||||
|
|
||||||
|
|
||||||
// if (!$log_id) {
|
// if (!$log_id) {
|
||||||
// return redirect('/')->with('error', 'Please login first!');
|
// return redirect('/')->with('error', 'Please login first!');
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
// $student = DB::table('student_details')
|
// $student = DB::table('student_details')
|
||||||
// ->where('student_portal_log_id', $log_id)
|
// ->where('student_id', $log_id)
|
||||||
|
// ->orWhere('student_portal_log_id', $log_id)
|
||||||
// ->first();
|
// ->first();
|
||||||
|
|
||||||
|
|
||||||
// if (!$student) {
|
// if (!$student) {
|
||||||
// return redirect()->back()->with('error', 'Student details not found!');
|
// $student = (object)[
|
||||||
|
// 'image' => '',
|
||||||
|
// 'full_name' => 'Data Not Found (Check DB)',
|
||||||
|
// 'student_id' => $log_id,
|
||||||
|
// 'nic_passport' => 'N/A',
|
||||||
|
// 'date_of_birth' => '2000-01-01',
|
||||||
|
// 'gender' => 'N/A',
|
||||||
|
// 'email' => 'N/A',
|
||||||
|
// 'phone' => 'N/A',
|
||||||
|
// 'qualification' => 'N/A',
|
||||||
|
// 'institute' => 'N/A',
|
||||||
|
// 'year_completed' => 'N/A',
|
||||||
|
// 'course_name' => 'N/A',
|
||||||
|
// 'duration' => 'N/A',
|
||||||
|
// 'current_semester' => 'N/A',
|
||||||
|
// 'trainer_name' => 'N/A'
|
||||||
|
// ];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
// return view('StudentProfile', compact('student'));
|
// return view('StudentProfile', compact('student'));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Password;
|
||||||
|
use Illuminate\View\View;
|
||||||
|
|
||||||
|
class ForgotPasswordController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display the password reset link request view.
|
||||||
|
*/
|
||||||
|
public function showLinkRequestForm(): View
|
||||||
|
{
|
||||||
|
return view('ForgotPassword');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a reset link to the given user.
|
||||||
|
*/
|
||||||
|
public function sendResetLinkEmail(Request $request): RedirectResponse
|
||||||
|
{
|
||||||
|
// 1. Validate the incoming email address
|
||||||
|
$request->validate([
|
||||||
|
'email' => ['required', 'email'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 2. Attempt to send the password reset link via Laravel Broker
|
||||||
|
$status = Password::sendResetLink(
|
||||||
|
$request->only('email')
|
||||||
|
);
|
||||||
|
|
||||||
|
// 3. Redirect back with status message or validation error
|
||||||
|
return $status === Password::RESET_LINK_SENT
|
||||||
|
? back()->with('status', __($status))
|
||||||
|
: back()->withErrors(['email' => __($status)]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,14 +3,22 @@
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class studentportalnavController extends Controller
|
class studentportalnavController extends Controller
|
||||||
{
|
{
|
||||||
public function logout(Request $request)
|
public function logout(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$request->session()->forget(['student_log_id', 'student_id']);
|
||||||
|
|
||||||
|
|
||||||
Auth::logout();
|
Auth::logout();
|
||||||
|
|
||||||
|
|
||||||
$request->session()->invalidate();
|
$request->session()->invalidate();
|
||||||
$request->session()->regenerateToken();
|
$request->session()->regenerateToken();
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'success' => true,
|
'success' => true,
|
||||||
'message' => 'Logged out successfully'
|
'message' => 'Logged out successfully'
|
||||||
|
|
|
||||||
|
|
@ -177,96 +177,92 @@ body {
|
||||||
|
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div class="profile-header">
|
<div class="profile-header">
|
||||||
<h2>
|
<h2> <i class="fas fa-user-graduate"></i> Student Profile </h2>
|
||||||
<i class="fas fa-user-graduate me-2" style="color: var(--theme-yellow);"></i>
|
<p>Manage your personal information and academic details.</p>
|
||||||
Student Profile
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Manage your personal information and academic details.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Main Profile Row -->
|
||||||
<div class="row g-4">
|
<div class="row g-4">
|
||||||
|
<!-- Profile Card -->
|
||||||
<!-- Profile Left -->
|
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<div class="profile-card text-center">
|
<div class="profile-card text-center">
|
||||||
<img src="https://i.pravatar.cc/300" class="profile-image mb-2">
|
<img src="{{ !empty($student->image) ? asset($student->image) : 'https://i.pravatar.cc/300' }}"
|
||||||
<h3 class="student-name">Kasun Perera</h3>
|
class="profile-image" alt="Profile Image">
|
||||||
|
|
||||||
<span class="student-id my-2">
|
<h3 class="student-name">{{ $student->full_name }}</h3>
|
||||||
Student ID : AEA20260045
|
|
||||||
|
<span class="student-id">
|
||||||
|
Student ID : {{ $student->student_id }}
|
||||||
</span>
|
</span>
|
||||||
<hr class="my-3" style="color: #cbd5e1;">
|
<hr>
|
||||||
|
|
||||||
<button class="edit-btn shadow-sm">
|
<button class="edit-btn mt-3">
|
||||||
<i class="fas fa-edit me-1"></i> Edit Profile
|
<i class="fas fa-edit"></i> Edit Profile
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Details -->
|
<!-- Personal Details -->
|
||||||
<div class="col-lg-8">
|
<div class="col-lg-8">
|
||||||
<div class="profile-card">
|
<div class="profile-card">
|
||||||
<h4 class="info-title">
|
<h4 class="info-title">
|
||||||
<i class="fas fa-user"></i>
|
<i class="fas fa-user"></i> Personal Information
|
||||||
Personal Information
|
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<div class="info-row">
|
<div class="info-row">
|
||||||
<span class="label">Full Name</span>
|
<span class="label">Full Name</span>
|
||||||
<span class="value">Kasuni Perera</span>
|
<span class="value">{{ $student->full_name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="info-row">
|
<div class="info-row">
|
||||||
<span class="label">NIC / Passport</span>
|
<span class="label">NIC / Passport</span>
|
||||||
<span class="value">200012345678</span>
|
<span class="value">{{ $student->nic_passport }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="info-row">
|
<div class="info-row">
|
||||||
<span class="label">Date of Birth</span>
|
<span class="label">Date of Birth</span>
|
||||||
<span class="value">15 March 2000</span>
|
<span class="value">
|
||||||
|
{{ !empty($student->date_of_birth) ? date('d F Y', strtotime($student->date_of_birth)) : 'N/A' }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="info-row">
|
<div class="info-row">
|
||||||
<span class="label">Gender</span>
|
<span class="label">Gender</span>
|
||||||
<span class="value">Male</span>
|
<span class="value">{{ $student->gender }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="info-row">
|
<div class="info-row">
|
||||||
<span class="label">Email</span>
|
<span class="label">Email</span>
|
||||||
<span class="value">student@email.com</span>
|
<span class="value">{{ $student->email }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="info-row">
|
<div class="info-row">
|
||||||
<span class="label">Phone</span>
|
<span class="label">Phone</span>
|
||||||
<span class="value">+94 77 1234567</span>
|
<span class="value">{{ $student->phone }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Education & Course Details Row -->
|
||||||
<div class="row g-4 mt-1">
|
<div class="row g-4 mt-1">
|
||||||
|
|
||||||
<!-- Education -->
|
<!-- Education -->
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<div class="profile-card">
|
<div class="profile-card">
|
||||||
<h4 class="info-title">
|
<h4 class="info-title">
|
||||||
<i class="fas fa-graduation-cap"></i>
|
<i class="fas fa-graduation-cap"></i> Educational Background
|
||||||
Educational Background
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="info-row">
|
<div class="info-row">
|
||||||
<span class="label">Qualification</span>
|
<span class="label">Qualification</span>
|
||||||
<span class="value">NVQ Level 4</span>
|
<span class="value">{{ $student->qualification }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-row">
|
<div class="info-row">
|
||||||
<span class="label">Institute</span>
|
<span class="label">Institute</span>
|
||||||
<span class="value">ABC Technical College</span>
|
<span class="value">{{ $student->institute }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-row">
|
<div class="info-row">
|
||||||
<span class="label">Year Completed</span>
|
<span class="label">Year Completed</span>
|
||||||
<span class="value">2025</span>
|
<span class="value">{{ $student->year_completed }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -274,24 +270,23 @@ body {
|
||||||
<!-- Course Details -->
|
<!-- Course Details -->
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<div class="course-box">
|
<div class="course-box">
|
||||||
<h4><i class="fas fa-car me-2"></i>Course Details</h4>
|
<h4><i class="fas fa-car"></i> Course Details</h4>
|
||||||
|
|
||||||
<div class="course-item">
|
<div class="course-item">
|
||||||
<i class="fas fa-book"></i> Diploma in Automobile Engineering
|
<i class="fas fa-book"></i> {{ $student->course_name }}
|
||||||
</div>
|
</div>
|
||||||
<div class="course-item">
|
<div class="course-item">
|
||||||
<i class="fas fa-calendar"></i> Duration : 2 Years
|
<i class="fas fa-calendar"></i> Duration : {{ $student->duration }}
|
||||||
</div>
|
</div>
|
||||||
<div class="course-item">
|
<div class="course-item">
|
||||||
<i class="fas fa-layer-group"></i> Current Semester : Semester 2
|
<i class="fas fa-layer-group"></i> Current Semester : {{ $student->current_semester }}
|
||||||
</div>
|
</div>
|
||||||
<div class="course-item">
|
<div class="course-item">
|
||||||
<i class="fas fa-user-tie"></i> Trainer : Mr. Nimal Silva
|
<i class="fas fa-user-tie"></i> Trainer : {{ $student->trainer_name }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
@ -0,0 +1,327 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>{{ session('step') == 'otp' ? 'Verify OTP' : 'Forgot Password' }}</title>
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||||
|
background: white;
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
background: #ffffff;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 420px;
|
||||||
|
border-radius: 16px;
|
||||||
|
padding: 40px 36px;
|
||||||
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-wrap {
|
||||||
|
width: 64px;
|
||||||
|
height: 64px;
|
||||||
|
background: #943835e3;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 0 auto 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-wrap svg {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
stroke: #eeff8f;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 22px;
|
||||||
|
color: #1f2937;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.subtitle {
|
||||||
|
text-align: center;
|
||||||
|
color: #6b7280;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-bottom: 28px;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-success {
|
||||||
|
background: #ecfdf5;
|
||||||
|
border: 1px solid #a7f3d0;
|
||||||
|
color: #047857;
|
||||||
|
padding: 12px 14px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-danger {
|
||||||
|
background: #fef2f2;
|
||||||
|
border: 1px solid #fecaca;
|
||||||
|
color: #dc2626;
|
||||||
|
padding: 12px 14px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: block;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #374151;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="email"] {
|
||||||
|
width: 100%;
|
||||||
|
padding: 12px 14px;
|
||||||
|
border: 1.5px solid #e5e7eb;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #1f2937;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="email"]:focus {
|
||||||
|
border-color: #8b5cf6;
|
||||||
|
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="email"]::placeholder {
|
||||||
|
color: #9ca3af;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-danger {
|
||||||
|
color: #dc2626;
|
||||||
|
font-size: 12.5px;
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.otp-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 8px;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.otp-input {
|
||||||
|
width: 48px;
|
||||||
|
height: 52px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #1f2937;
|
||||||
|
border: 1.5px solid #e5e7eb;
|
||||||
|
border-radius: 10px;
|
||||||
|
outline: none;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.otp-input:focus {
|
||||||
|
border-color: #943835e3;
|
||||||
|
box-shadow: 0 0 0 3px rgba(148, 56, 53, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
button[type="submit"] {
|
||||||
|
width: 100%;
|
||||||
|
padding: 13px;
|
||||||
|
background: #943835e3;
|
||||||
|
color: #fff;
|
||||||
|
border: none;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
button[type="submit"]:hover {
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: 0 8px 20px rgba(148, 56, 53, 0.35);
|
||||||
|
}
|
||||||
|
|
||||||
|
button[type="submit"]:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.resend-box {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 22px;
|
||||||
|
font-size: 13.5px;
|
||||||
|
color: #6b7280;
|
||||||
|
}
|
||||||
|
|
||||||
|
.resend-box button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: #231d77e3;
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-link {
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 22px;
|
||||||
|
font-size: 13.5px;
|
||||||
|
color: #6b7280;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-link:hover {
|
||||||
|
color: #231d77e3;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
{{-- SUCCESS & ERROR ALERTS --}}
|
||||||
|
@if (session('status'))
|
||||||
|
<div class="alert-success">{{ session('status') }}</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if ($errors->has('otp'))
|
||||||
|
<div class="alert-danger">{{ $errors->first('otp') }}</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- SECTION 2: VERIFY OTP (Shows when session step is 'otp') --}}
|
||||||
|
@if (session('step') === 'otp')
|
||||||
|
<div class="icon-wrap">
|
||||||
|
<svg fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751A11.959 11.959 0 0112 2.714z" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1>Enter OTP Code</h1>
|
||||||
|
<p class="subtitle">We've sent a 6-digit verification code to <br><strong>{{ session('email', old('email')) }}</strong></p>
|
||||||
|
|
||||||
|
<form method="POST" action="{{ route('password.verify.otp') }}" id="otp-form">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="email" value="{{ session('email', old('email')) }}">
|
||||||
|
<input type="hidden" name="otp" id="full-otp">
|
||||||
|
|
||||||
|
<div class="otp-container">
|
||||||
|
<input type="text" maxlength="1" class="otp-input" autofocus autocomplete="off">
|
||||||
|
<input type="text" maxlength="1" class="otp-input" autocomplete="off">
|
||||||
|
<input type="text" maxlength="1" class="otp-input" autocomplete="off">
|
||||||
|
<input type="text" maxlength="1" class="otp-input" autocomplete="off">
|
||||||
|
<input type="text" maxlength="1" class="otp-input" autocomplete="off">
|
||||||
|
<input type="text" maxlength="1" class="otp-input" autocomplete="off">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit">Verify & Continue</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div class="resend-box">
|
||||||
|
Didn't receive the code?
|
||||||
|
<form method="POST" action="{{ route('password.email') }}" style="display: inline;">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="email" value="{{ session('email', old('email')) }}">
|
||||||
|
<button type="submit">Resend OTP</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- SECTION 1: FORGOT PASSWORD (Default view) --}}
|
||||||
|
@else
|
||||||
|
<div class="icon-wrap">
|
||||||
|
<svg fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1>Forgot Password?</h1>
|
||||||
|
<p class="subtitle">No worries! Enter your email and we'll send you a link to reset your password.</p>
|
||||||
|
|
||||||
|
<form method="POST" action="{{ route('password.email') }}">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="email">Email Address</label>
|
||||||
|
<input
|
||||||
|
id="email"
|
||||||
|
type="email"
|
||||||
|
name="email"
|
||||||
|
value="{{ old('email') }}"
|
||||||
|
placeholder="you@example.com"
|
||||||
|
required
|
||||||
|
autofocus
|
||||||
|
>
|
||||||
|
@error('email')
|
||||||
|
<div class="text-danger">{{ $message }}</div>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit">Send OTP</button>
|
||||||
|
</form>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<a href="/signin" class="back-link">← Back to Login</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if (session('step') === 'otp')
|
||||||
|
<script>
|
||||||
|
const inputs = document.querySelectorAll('.otp-input');
|
||||||
|
const form = document.getElementById('otp-form');
|
||||||
|
const fullOtpInput = document.getElementById('full-otp');
|
||||||
|
|
||||||
|
inputs.forEach((input, index) => {
|
||||||
|
input.addEventListener('input', (e) => {
|
||||||
|
if (e.target.value.length === 1 && index < inputs.length - 1) {
|
||||||
|
inputs[index + 1].focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
input.addEventListener('keydown', (e) => {
|
||||||
|
if (e.key === 'Backspace' && !e.target.value && index > 0) {
|
||||||
|
inputs[index - 1].focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
input.addEventListener('paste', (e) => {
|
||||||
|
const pasteData = e.clipboardData.getData('text').trim();
|
||||||
|
if (pasteData.length === inputs.length) {
|
||||||
|
pasteData.split('').forEach((char, i) => {
|
||||||
|
inputs[i].value = char;
|
||||||
|
});
|
||||||
|
inputs[inputs.length - 1].focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
form.addEventListener('submit', (e) => {
|
||||||
|
let otpValue = '';
|
||||||
|
inputs.forEach(input => otpValue += input.value);
|
||||||
|
fullOtpInput.value = otpValue;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endif
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -296,7 +296,10 @@
|
||||||
<a href="/Feedback&Complain" class="nav-link {{ request()->is('Feedback&Complain*') ? 'active' : '' }}">
|
<a href="/Feedback&Complain" class="nav-link {{ request()->is('Feedback&Complain*') ? 'active' : '' }}">
|
||||||
<i class="fa-solid fa-comments"></i> Feedback & Complain
|
<i class="fa-solid fa-comments"></i> Feedback & Complain
|
||||||
</a>
|
</a>
|
||||||
<a href="/StudentProfile" class="nav-link {{ request()->is('StudentProfile*') ? 'active' : '' }}">
|
<!-- <a href="/StudentProfile" class="nav-link {{ request()->is('StudentProfile*') ? 'active' : '' }}">
|
||||||
|
<i class="fa-solid fa-user"></i> Student Profile
|
||||||
|
</a> -->
|
||||||
|
<a href="{{ route('StudentProfile') }}" class="nav-link {{ request()->routeIs('StudentProfile') ? 'active' : '' }}">
|
||||||
<i class="fa-solid fa-user"></i> Student Profile
|
<i class="fa-solid fa-user"></i> Student Profile
|
||||||
</a>
|
</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
@ -344,7 +347,37 @@
|
||||||
<!-- Scripts -->
|
<!-- Scripts -->
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
function submitLogout() {
|
||||||
|
const tokenEl = document.querySelector('meta[name="csrf-token"]');
|
||||||
|
|
||||||
|
fetch('/studentlogout', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'Accept': 'application/json',
|
||||||
|
'X-CSRF-TOKEN': tokenEl ? tokenEl.getAttribute('content') : ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(data => {
|
||||||
|
if (data.success) {
|
||||||
|
|
||||||
|
window.location.href = '/signin';
|
||||||
|
} else {
|
||||||
|
alert('Logout failed. Please try again.');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error('Error:', err);
|
||||||
|
alert('Server side error occurred during logout.');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- <script>
|
||||||
// Sidebar Toggle Logic
|
// Sidebar Toggle Logic
|
||||||
const toggleBtn = document.getElementById('toggleBtn');
|
const toggleBtn = document.getElementById('toggleBtn');
|
||||||
const sidebar = document.getElementById('sidebar');
|
const sidebar = document.getElementById('sidebar');
|
||||||
|
|
@ -391,6 +424,6 @@
|
||||||
alert('Server side error occurred during logout.');
|
alert('Server side error occurred during logout.');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script> -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -110,14 +110,14 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
background: #5E244E;
|
background: #822424;
|
||||||
border: none;
|
border: none;
|
||||||
color: white;
|
color: white;
|
||||||
transition: background 0.2s ease-in-out, transform 0.1s ease;
|
transition: background 0.2s ease-in-out, transform 0.1s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary:hover, .btn-primary:focus {
|
.btn-primary:hover, .btn-primary:focus {
|
||||||
background: #4a1c3e;
|
background: #822424;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
/* ===== Global Improvements ===== */
|
/* ===== Global Improvements ===== */
|
||||||
body {
|
body {
|
||||||
font-family: 'Segoe UI', Arial, sans-serif;
|
font-family: 'Segoe UI', Arial, sans-serif;
|
||||||
color: #FFFD67;
|
color: #1E293B;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -39,6 +39,7 @@ body {
|
||||||
padding: 53px 0;
|
padding: 53px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.section-title, h2, h3, h4, h5, h6 {
|
.section-title, h2, h3, h4, h5, h6 {
|
||||||
font-family: 'Segoe UI', Arial, sans-serif;
|
font-family: 'Segoe UI', Arial, sans-serif;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|
@ -92,14 +93,12 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-outline-light-custom:hover {
|
.btn-outline-light-custom:hover {
|
||||||
background: #fff;
|
background: #f2e862;
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
border-color: #fff;
|
border-color: #fff;
|
||||||
transform: translateY(-3px);
|
transform: translateY(-3px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.hero {
|
.hero {
|
||||||
height:636px;
|
height:636px;
|
||||||
background: linear-gradient(rgba(207, 226, 255, 0.88), rgba(0, 9, 15, 0.75)), url('https://images.unsplash.com/photo-1517524206127-48bbd363f3d7?auto=format&fit=crop&w=1600&q=80');
|
background: linear-gradient(rgba(207, 226, 255, 0.88), rgba(0, 9, 15, 0.75)), url('https://images.unsplash.com/photo-1517524206127-48bbd363f3d7?auto=format&fit=crop&w=1600&q=80');
|
||||||
|
|
@ -130,14 +129,12 @@ body {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.courses-section {
|
.courses-section {
|
||||||
background-color: var(--bg-light);
|
background-color: var(--bg-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
.course-card {
|
.course-card {
|
||||||
border: 1px solid var(--card-border);
|
border: 1px solid var(--card-border);
|
||||||
/* border-radius: 12px !important; */
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||||
|
|
@ -240,7 +237,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.course-footer {
|
.course-footer {
|
||||||
margin-top: auto; /* Pushes the footer area to the exact bottom of the card */
|
margin-top: auto;
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
border-top: 1px solid rgba(15, 44, 89, 0.08);
|
border-top: 1px solid rgba(15, 44, 89, 0.08);
|
||||||
}
|
}
|
||||||
|
|
@ -265,9 +262,7 @@ body {
|
||||||
|
|
||||||
.read-btn {
|
.read-btn {
|
||||||
background:#822424;
|
background:#822424;
|
||||||
/* background: #3E51B8; */
|
|
||||||
color: white;
|
color: white;
|
||||||
/* border: 2px solid var(--primary); */
|
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
|
@ -302,14 +297,6 @@ body {
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-divider {
|
|
||||||
height: 4px;
|
|
||||||
width: 60px;
|
|
||||||
background-color: var(--secondary);
|
|
||||||
margin: 15px auto 0 auto;
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-feature-card {
|
.custom-feature-card {
|
||||||
background: rgba(255, 255, 255, 0.43);
|
background: rgba(255, 255, 255, 0.43);
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
|
|
@ -320,8 +307,7 @@ body {
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-feature-card:hover
|
.custom-feature-card:hover {
|
||||||
{
|
|
||||||
transform: translateY(-5px);
|
transform: translateY(-5px);
|
||||||
background: rgba(255, 255, 255, 0.07);
|
background: rgba(255, 255, 255, 0.07);
|
||||||
border-color: rgba(255, 255, 255, 0.2);
|
border-color: rgba(255, 255, 255, 0.2);
|
||||||
|
|
@ -357,6 +343,14 @@ body {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: translateY(0) scale(1);
|
transform: translateY(0) scale(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ===== Modal Styling ===== */
|
||||||
|
.custom-modal-header {
|
||||||
|
background-color: white;
|
||||||
|
color: #fff;
|
||||||
|
border-bottom: 3px solid var(--secondary);
|
||||||
|
padding: 23px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
{{-- ===================== HERO ===================== --}}
|
{{-- ===================== HERO ===================== --}}
|
||||||
|
|
@ -381,10 +375,9 @@ body {
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{{-- ===================== IMPROVED COURSES SECTION ===================== --}}
|
{{-- ===================== COURSES SECTION ===================== --}}
|
||||||
<section class="section courses-section" aria-labelledby="courses-heading">
|
<section class="section courses-section" aria-labelledby="courses-heading">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<div class="text-center mb-5 animate-on-scroll fade-up-init">
|
<div class="text-center mb-5 animate-on-scroll fade-up-init">
|
||||||
<span class="text-uppercase fw-bold small d-block mb-2" style="color: #822424; letter-spacing: 0.1em;">Academic Programs</span>
|
<span class="text-uppercase fw-bold small d-block mb-2" style="color: #822424; letter-spacing: 0.1em;">Academic Programs</span>
|
||||||
<h2 id="courses-heading" class="display-5 mb-2" style="font-weight: normal; color:#2D355B;">Our Top Courses</h2>
|
<h2 id="courses-heading" class="display-5 mb-2" style="font-weight: normal; color:#2D355B;">Our Top Courses</h2>
|
||||||
|
|
@ -394,6 +387,9 @@ body {
|
||||||
@php
|
@php
|
||||||
$courses = [
|
$courses = [
|
||||||
[
|
[
|
||||||
|
'id' => 'course-1',
|
||||||
|
'category' => 'mechanical',
|
||||||
|
'level' => 'ol',
|
||||||
'image' => 'https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?auto=format&fit=crop&w=800&q=80',
|
'image' => 'https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?auto=format&fit=crop&w=800&q=80',
|
||||||
'title' => 'Automotive Engineering Course',
|
'title' => 'Automotive Engineering Course',
|
||||||
'desc' => 'Learn vehicle design, engine technology, diagnostics and manufacturing workflows comprehensively.',
|
'desc' => 'Learn vehicle design, engine technology, diagnostics and manufacturing workflows comprehensively.',
|
||||||
|
|
@ -403,6 +399,9 @@ body {
|
||||||
'badge' => 'Popular'
|
'badge' => 'Popular'
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
'id' => 'course-2',
|
||||||
|
'category' => 'mechanical',
|
||||||
|
'level' => 'al',
|
||||||
'image' => 'https://images.unsplash.com/photo-1503376780353-7e6692767b70?auto=format&fit=crop&w=800&q=80',
|
'image' => 'https://images.unsplash.com/photo-1503376780353-7e6692767b70?auto=format&fit=crop&w=800&q=80',
|
||||||
'title' => 'Mechanical Systems Course',
|
'title' => 'Mechanical Systems Course',
|
||||||
'desc' => 'Study power transmission systems, active suspension, breaking dynamics and diagnostics.',
|
'desc' => 'Study power transmission systems, active suspension, breaking dynamics and diagnostics.',
|
||||||
|
|
@ -412,6 +411,9 @@ body {
|
||||||
'badge' => 'Bestseller'
|
'badge' => 'Bestseller'
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
'id' => 'course-3',
|
||||||
|
'category' => 'ev',
|
||||||
|
'level' => 'al',
|
||||||
'image' => 'https://images.unsplash.com/photo-1502877338535-766e1452684a?auto=format&fit=crop&w=800&q=80',
|
'image' => 'https://images.unsplash.com/photo-1502877338535-766e1452684a?auto=format&fit=crop&w=800&q=80',
|
||||||
'title' => 'Electric Vehicle Tech Course',
|
'title' => 'Electric Vehicle Tech Course',
|
||||||
'desc' => 'Master advanced EV battery management, powertrains, smart networks and electric mobility.',
|
'desc' => 'Master advanced EV battery management, powertrains, smart networks and electric mobility.',
|
||||||
|
|
@ -445,7 +447,6 @@ body {
|
||||||
<span class="feature-pill"><i class="fas fa-certificate"></i> Accredited</span>
|
<span class="feature-pill"><i class="fas fa-certificate"></i> Accredited</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Footer wrapped inside card-body with margin-top: auto to perfectly align elements -->
|
|
||||||
<div class="course-footer">
|
<div class="course-footer">
|
||||||
<div class="course-meta-row">
|
<div class="course-meta-row">
|
||||||
<span class="rating-star">
|
<span class="rating-star">
|
||||||
|
|
@ -458,7 +459,6 @@ body {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
@ -469,11 +469,9 @@ body {
|
||||||
View All Courses <i class="fa-solid fa-arrow-right ms-2"></i>
|
View All Courses <i class="fa-solid fa-arrow-right ms-2"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
{{-- ===================== WHY CHOOSE US ===================== --}}
|
{{-- ===================== WHY CHOOSE US ===================== --}}
|
||||||
<section class="section why-section text-white position-relative overflow-hidden" aria-labelledby="why-us-heading" style="background-attachment: fixed;">
|
<section class="section why-section text-white position-relative overflow-hidden" aria-labelledby="why-us-heading" style="background-attachment: fixed;">
|
||||||
<div class="why-overlay"></div>
|
<div class="why-overlay"></div>
|
||||||
|
|
@ -491,7 +489,7 @@ body {
|
||||||
<div class="col-md-6 col-lg-4">
|
<div class="col-md-6 col-lg-4">
|
||||||
<div class="custom-feature-card h-100 d-flex flex-column align-items-center text-center p-4" style="border-radius: 20px; transition: all 0.4s ease;">
|
<div class="custom-feature-card h-100 d-flex flex-column align-items-center text-center p-4" style="border-radius: 20px; transition: all 0.4s ease;">
|
||||||
<div class="icon-box d-flex align-items-center justify-content-center" style="box-shadow: 0 10px 20px rgba(0,0,0,0.15); border-radius: 16px;">
|
<div class="icon-box d-flex align-items-center justify-content-center" style="box-shadow: 0 10px 20px rgba(0,0,0,0.15); border-radius: 16px;">
|
||||||
<i class="fa-solid fa-flask-vial fs-3 fa-beat-hover" style="--fa-animation-duration: 1.5s;"></i>
|
<i class="fa-solid fa-flask-vial fs-3 fa-beat-hover"></i>
|
||||||
</div>
|
</div>
|
||||||
<h4 class="text-white fs-5 mb-3 fw-semibold">Modern Laboratories</h4>
|
<h4 class="text-white fs-5 mb-3 fw-semibold">Modern Laboratories</h4>
|
||||||
<p class="text-white-50 small mb-0 lh-base">State-of-the-art facilities equipped with latest industrial testing tools.</p>
|
<p class="text-white-50 small mb-0 lh-base">State-of-the-art facilities equipped with latest industrial testing tools.</p>
|
||||||
|
|
@ -530,8 +528,65 @@ body {
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
{{-- ===================== COURSE FINDER MODAL ===================== --}}
|
||||||
|
<div class="modal fade" id="courseFinderModal" tabindex="-1" aria-labelledby="courseFinderModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-dialog-centered modal-lg">
|
||||||
|
<div class="modal-content" style="width:60%;">
|
||||||
|
<div class="modal-header custom-modal-header">
|
||||||
|
<h5 class="modal-title fw-bold" id="courseFinderModalLabel">
|
||||||
|
<i class="fa-solid fa-compass me-2"></i>Find Your Course
|
||||||
|
</h5>
|
||||||
|
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body p-4">
|
||||||
|
<form id="courseFinderForm">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="educationLevel" class="form-label fw-semibold text-dark">
|
||||||
|
<i class="fa-solid fa-user-degree me-1 text-primary"></i> What is your highest educational qualification?
|
||||||
|
</label>
|
||||||
|
<select class="form-select border-2" id="educationLevel" required style=" padding: .375rem 2.25rem 2.375rem .75rem;height: 89px;">
|
||||||
|
<option value="" selected disabled>Select Educational Qualification</option>
|
||||||
|
<option value="ol">Completed Ordinary Level (O/L)</option>
|
||||||
|
<option value="al">Completed Advanced Level (A/L)</option>
|
||||||
|
<option value="diploma">Diploma / Vocational Qualification</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-4">
|
||||||
|
<label for="interestArea" class="form-label fw-semibold text-dark">
|
||||||
|
Which area of Automotive Engineering interests you most?
|
||||||
|
</label>
|
||||||
|
<select class="form-select border-2" id="interestArea" required style=" padding: .375rem 2.25rem 2.375rem .75rem;height: 89px;">
|
||||||
|
<option value="" selected disabled>Select Field of Interest</option>
|
||||||
|
<option value="mechanical">Automotive Mechanical & Diagnostics</option>
|
||||||
|
<option value="ev">Electric Vehicles (EV) & Battery Technology</option>
|
||||||
|
<option value="all">General Automotive Engineering (All Areas)</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-theme w-100" style="background:#822424;">
|
||||||
|
<i class="fa-solid fa-magnifying-glass me-2"></i>Find Recommended Courses
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{{-- Result Area --}}
|
||||||
|
<div id="recommendedResults" class="mt-4" style="display: none;">
|
||||||
|
<hr class="my-4">
|
||||||
|
<h5 class="fw-bold text-success mb-3">
|
||||||
|
<i class="fa-solid fa-circle-check me-2"></i>Recommended Courses for You:
|
||||||
|
</h5>
|
||||||
|
<div id="resultsContainer" class="row g-3">
|
||||||
|
<!-- JS injected courses will appear here -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
// 1. Scroll Animations
|
||||||
const animatedElements = document.querySelectorAll('.animate-on-scroll');
|
const animatedElements = document.querySelectorAll('.animate-on-scroll');
|
||||||
const observer = new IntersectionObserver((entries) => {
|
const observer = new IntersectionObserver((entries) => {
|
||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
|
|
@ -542,6 +597,62 @@ body {
|
||||||
});
|
});
|
||||||
}, { threshold: 0.1 });
|
}, { threshold: 0.1 });
|
||||||
animatedElements.forEach(el => observer.observe(el));
|
animatedElements.forEach(el => observer.observe(el));
|
||||||
|
|
||||||
|
// 2. Auto Open Modal on Site Load
|
||||||
|
const courseModalElement = document.getElementById('courseFinderModal');
|
||||||
|
if (courseModalElement && typeof bootstrap !== 'undefined') {
|
||||||
|
const courseModal = new bootstrap.Modal(courseModalElement);
|
||||||
|
courseModal.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. Course Recommendation Logic
|
||||||
|
const allCourses = @json($courses);
|
||||||
|
const form = document.getElementById('courseFinderForm');
|
||||||
|
const resultsArea = document.getElementById('recommendedResults');
|
||||||
|
const resultsContainer = document.getElementById('resultsContainer');
|
||||||
|
|
||||||
|
form.addEventListener('submit', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
const selectedLevel = document.getElementById('educationLevel').value;
|
||||||
|
const selectedInterest = document.getElementById('interestArea').value;
|
||||||
|
|
||||||
|
// Filter logic
|
||||||
|
const filtered = allCourses.filter(course => {
|
||||||
|
const matchCategory = (selectedInterest === 'all') || (course.category === selectedInterest);
|
||||||
|
const matchLevel = (selectedLevel === 'ol' && course.level === 'ol') ||
|
||||||
|
(selectedLevel === 'al') ||
|
||||||
|
(selectedLevel === 'diploma');
|
||||||
|
return matchCategory && matchLevel;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Display Results
|
||||||
|
resultsContainer.innerHTML = '';
|
||||||
|
if (filtered.length > 0) {
|
||||||
|
filtered.forEach(course => {
|
||||||
|
const cardHTML = `
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="card h-100 border shadow-sm">
|
||||||
|
<img src="${course.image}" class="card-img-top" style="height: 120px; object-fit: cover;" alt="${course.title}">
|
||||||
|
<div class="card-body p-3 d-flex flex-column justify-content-between">
|
||||||
|
<div>
|
||||||
|
<h6 class="fw-bold mb-1" style="color: var(--primary);">${course.title}</h6>
|
||||||
|
<p class="small text-muted mb-2">${course.desc.substring(0, 60)}...</p>
|
||||||
|
</div>
|
||||||
|
<a href="/courses" class="btn btn-sm btn-outline-primary mt-2" style="color: #fff;
|
||||||
|
background: #953f3f;border-color:white;">View Details</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
resultsContainer.innerHTML += cardHTML;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
resultsContainer.innerHTML = `<p class="text-muted">No specific courses matched your criteria. Please explore all available courses.</p>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
resultsArea.style.display = 'block';
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@ use App\Http\Controllers\StudentPortalController;
|
||||||
use App\Http\Controllers\ContactMsgController;
|
use App\Http\Controllers\ContactMsgController;
|
||||||
use App\Http\Controllers\FeedbackController;
|
use App\Http\Controllers\FeedbackController;
|
||||||
use App\Http\Controllers\studentportalnavController;
|
use App\Http\Controllers\studentportalnavController;
|
||||||
|
use App\Http\Controllers\auth\asswordController;
|
||||||
|
use App\Http\Controllers\Auth\ForgotPasswordController;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
@ -18,7 +21,43 @@ Route::get('/', function () {
|
||||||
return view('welcome');
|
return view('welcome');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::post('/studentlogout', [studentportalnavController::class, 'logout']);
|
|
||||||
|
|
||||||
|
Route::get('forgot-password', [ForgotPasswordController::class, 'showLinkRequestForm'])->name('password.request');
|
||||||
|
Route::post('forgot-password', [ForgotPasswordController::class, 'sendResetLinkEmail'])->name('password.email');
|
||||||
|
|
||||||
|
|
||||||
|
// Route::get('password/reset', [ForgotPasswordController::class, 'showLinkRequestForm'])
|
||||||
|
// ->name('password.request');
|
||||||
|
|
||||||
|
// Route::post('password/email', [ForgotPasswordController::class, 'sendResetLinkEmail'])
|
||||||
|
// ->name('password.email');
|
||||||
|
|
||||||
|
// Route::get('password/reset/{token}', [ForgotPasswordController::class, 'showResetForm'])
|
||||||
|
// ->name('password.reset');
|
||||||
|
|
||||||
|
// Route::post('password/reset', [ForgotPasswordController::class, 'reset'])
|
||||||
|
// ->name('password.update');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Password Reset Routes
|
||||||
|
Route::get('password/reset', [ForgotPasswordController::class, 'showLinkRequestForm'])
|
||||||
|
->name('password.request');
|
||||||
|
|
||||||
|
Route::post('password/email', [ForgotPasswordController::class, 'sendResetLinkEmail'])
|
||||||
|
->name('password.email');
|
||||||
|
|
||||||
|
Route::get('password/reset/{token}', [ForgotPasswordController::class, 'showResetForm'])
|
||||||
|
->name('password.reset');
|
||||||
|
|
||||||
|
Route::post('password/reset', [ForgotPasswordController::class, 'reset'])
|
||||||
|
->name('password.update');
|
||||||
|
Route::post('/studentlogout', [studentportalnavController::class, 'logout'])->name('student.logout');
|
||||||
|
|
||||||
|
Route::get('/StudentProfile', [StudentPortalController::class, 'showProfile'])->name('StudentProfile');
|
||||||
|
|
||||||
|
// Route::post('/studentlogout', [studentportalnavController::class, 'logout']);
|
||||||
|
|
||||||
Route::post('/feedback/store', [FeedbackController::class, 'feedback']) ->middleware('auth') ->name('feedback.store');
|
Route::post('/feedback/store', [FeedbackController::class, 'feedback']) ->middleware('auth') ->name('feedback.store');
|
||||||
|
|
||||||
|
|
@ -75,4 +114,4 @@ Route::view('/Assignments','Assignments')->name('Assignments');
|
||||||
Route::view('/Studentguidelines','Studentguidelines')->name('Studentguidelines');
|
Route::view('/Studentguidelines','Studentguidelines')->name('Studentguidelines');
|
||||||
Route::view('/results','results')->name('results');
|
Route::view('/results','results')->name('results');
|
||||||
Route::view('/Feedback&Complain','Feedback&Complain')->name('Feedback&Complain');
|
Route::view('/Feedback&Complain','Feedback&Complain')->name('Feedback&Complain');
|
||||||
Route::view('/StudentProfile','StudentProfile')->name('StudentProfile');
|
// Route::view('/StudentProfile','StudentProfile')->name('StudentProfile');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue