From 31a16b79aa1d02b448e9e096e717c814ea5be778 Mon Sep 17 00:00:00 2001 From: imadhigp Date: Mon, 13 Jul 2026 17:04:57 +0530 Subject: [PATCH] fix0713 --- app/Http/Controllers/AuthController.php | 38 ++ .../Controllers/StudentPortalController.php | 10 +- resources/views/Assignments.blade.php | 400 ++++++++++++ resources/views/Feedback&Complain.blade.php | 589 ++++++++++++++++++ resources/views/StudentPortal.blade.php | 256 +++++++- resources/views/StudentProfile.blade.php | 549 ++++++++++++++++ resources/views/Studentguidelines.blade.php | 474 ++++++++++++++ resources/views/layouts/app.blade.php | 12 +- .../views/layouts/studentportalnav.blade.php | 276 ++++++++ resources/views/mycourse.blade.php | 354 +++++++++++ resources/views/profile.blade.php | 176 ++++++ resources/views/results.blade.php | 528 ++++++++++++++++ resources/views/students.blade.php | 6 +- resources/views/timetable.blade.php | 386 ++++++++++++ routes/web.php | 25 +- 15 files changed, 4037 insertions(+), 42 deletions(-) create mode 100644 resources/views/Assignments.blade.php create mode 100644 resources/views/Feedback&Complain.blade.php create mode 100644 resources/views/StudentProfile.blade.php create mode 100644 resources/views/Studentguidelines.blade.php create mode 100644 resources/views/layouts/studentportalnav.blade.php create mode 100644 resources/views/mycourse.blade.php create mode 100644 resources/views/profile.blade.php create mode 100644 resources/views/results.blade.php create mode 100644 resources/views/timetable.blade.php diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index 446e291..f8c360d 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -10,6 +10,20 @@ use Illuminate\Support\Facades\Log; class AuthController extends Controller { + + + +public function profilview(Request $request) +{ + // Auth wi inna userge data gannawa + $user = Auth::user(); + + // profile.blade.php file ekata data pass karanawa + return view('profile', compact('user')); +} + + + /** * Handle Student Registration (POST) */ @@ -88,4 +102,28 @@ class AuthController extends Controller return response()->json(['success' => true, 'forced' => true]); } } + + public function update(Request $request) +{ + + $request->validate([ + 'first_name' => 'required|string|max:255', + 'last_name' => 'required|string|max:255', + 'phone' => 'nullable|string|max:20', + ]); + + + $user = Auth::user(); + + + $user->update([ + 'first_name' => $request->first_name, + 'last_name' => $request->last_name, + 'phone' => $request->phone, + ]); + + + return redirect()->back()->with('success', 'Profile updated successfully!'); +} + } \ No newline at end of file diff --git a/app/Http/Controllers/StudentPortalController.php b/app/Http/Controllers/StudentPortalController.php index da87fb4..a1bf9ed 100644 --- a/app/Http/Controllers/StudentPortalController.php +++ b/app/Http/Controllers/StudentPortalController.php @@ -23,22 +23,22 @@ public function studentlogin(Request $request) ->where('email', $request->username) ->first(); - // 1. Hash::check පාවිච්චි කරලා password එක check කරන්න + if ($student && Hash::check($request->password, $student->password) && $student->pin == $request->pin) { - // 2. Status එක active හෝ හිස් ("") වුණොත් ඇතුලට යන්න දෙන්න + if ($student->status !== 'active' && $student->status !== '') { return redirect('/')->with('error', 'Your account is inactive!'); } - // Session එකට ID එක දානවා + $request->session()->put('student_id', $student->studentid); - // කෙලින්ම Student Portal එකට redirect කරනවා + return redirect()->route('student.portal')->with('success', 'Logged in successfully!'); } - // දත්ත වැරදියි නම් හෝම් පේජ් එකට යවනවා + return redirect('/')->with('error', 'Invalid Email, Password, or PIN!'); } } diff --git a/resources/views/Assignments.blade.php b/resources/views/Assignments.blade.php new file mode 100644 index 0000000..b26d529 --- /dev/null +++ b/resources/views/Assignments.blade.php @@ -0,0 +1,400 @@ +@extends('layouts.studentportalnav') + +@section('title', 'Assignments') + +@section('content') + + + +
+ + + +
+ +
+

+ + Assignments +

+ +

+ View, download and submit your course assignments. +

+
+ +
+ + + +
+ +
+ + + +
+ +
+ + + + + + +
+ +
+ +
+ + + +
+ +
+ +
+ +
+ Engine Maintenance Report +
+ +
+ +
+ +
+ Module + Automobile Engineering +
+ +
+ Due Date + + 20 July 2026 + +
+ +
+ Status + + + Pending + + +
+ +
+ +

+ + Prepare a detailed report on preventive engine + maintenance including servicing procedures and + safety guidelines. + +

+ + + +
+ +
+
+ +
+ + + +
+ +
+ +
+ + + +
+ +
+ +
+ +
+ Brake System Inspection +
+ +
+ +
+ +
+ Module + Vehicle Technology +
+ +
+ Due Date + + 10 July 2026 + +
+ +
+ Status + + + +
+ +
+ +

+ + Explain the complete brake inspection procedure + with diagrams and maintenance schedule. + +

+ + + +
+ +
+
+ +
+ +
+ + + + + Download + + + + + +
+ +
+ +
+ +
+ + + +
+ +
+ +
+ +
+ Transmission System Analysis +
+ +
+ +
+ +
+ Module + Power Train +
+ +
+ Due Date + + 01 July 2026 + +
+ +
+ Status + + + Overdue + + +
+ +
+ +

+ + Compare manual and automatic transmission systems + with advantages and disadvantages. + +

+ + + +
+ +
+
+ +
+ +
+ + + + + Download + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +@endsection \ No newline at end of file diff --git a/resources/views/Feedback&Complain.blade.php b/resources/views/Feedback&Complain.blade.php new file mode 100644 index 0000000..99284ec --- /dev/null +++ b/resources/views/Feedback&Complain.blade.php @@ -0,0 +1,589 @@ +@extends('layouts.studentportalnav') + +@section('title','Feedback & Complaint') + +@section('content') + + + + + +
+ + + + + + + + +
+ + + + +
+ + + + + +
+ + + + + + + +
+ + + + + +
+ + +
+ + + + + + + + + +
+ + +
+ + +

+ + + + Previous Requests + +

+ + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Type + + Subject + + Date + + Status +
+ Feedback + + Workshop Equipment + + 10 July 2026 + + + + + Resolved + + + + +
+ Complaint + + Class Schedule Issue + + 05 July 2026 + + + + + Pending + + + + +
+ + +
+ + +
+ + + +
+ + +@endsection \ No newline at end of file diff --git a/resources/views/StudentPortal.blade.php b/resources/views/StudentPortal.blade.php index 1150c1a..ebd6f43 100644 --- a/resources/views/StudentPortal.blade.php +++ b/resources/views/StudentPortal.blade.php @@ -1,7 +1,12 @@ - - +@extends('layouts.studentportalnav') + +@section('title', 'Dashboard') + +@section('content') + + - + - - + +
- -

Welcome back, Nimasha

+ +

Welcome back, Imaa

Here's what's happening with your studies today.

@@ -270,12 +386,14 @@
-
+
+
6
Enrolled Courses
+
@@ -294,15 +412,95 @@
-
Rs. 12,000
-
Balance Due
+
2
+
Examination Notices
-
+
+ +
+ -
+ -
+ + + \ No newline at end of file diff --git a/resources/views/mycourse.blade.php b/resources/views/mycourse.blade.php new file mode 100644 index 0000000..79ff5b2 --- /dev/null +++ b/resources/views/mycourse.blade.php @@ -0,0 +1,354 @@ +@extends('layouts.studentportalnav') + +@section('title', 'My Course') + +@section('content') + + + + + + + + +
+
+ + + + + +
+ + +
+ + +
+ Course Image +
+
+
+

AE101

+

+ Automotive Engineering Department +

+
+ Diploma +
+ +

+ Master engine diagnostics, suspension systems, transmission technology, electrical systems and hybrid vehicle maintenance. +

+ +
+
+ Overall Progress + 55% +
+
+
+
+
+
+
+ + +
+

+ Course Modules +

+
+ + +
+ +
+
+
+
+
+
Engine Fundamentals
+ Completed +
+

Learn engine parts and working principles.

+
+
+ +
+
+
+
+ + +
+
+
+
+
+
Transmission Systems
+ In Progress +
+

Manual & Automatic transmission systems.

+
+
+ +
+
+
+
+ + +
+
+
+
+
+
Brake Systems
+ Locked +
+

Complete previous module to unlock.

+
+
+ +
+
+
+
+ + +
+
+
+
+
+
Hybrid Technology
+ Locked +
+

Learn EV and Hybrid systems.

+
+
+ +
+
+
+
+
+ +
+ + +
+
+
+
+
+
+
12
+ Modules Available +
+
+
+ +
+
+
+
+
2 Years
+ Course Duration +
+
+
+ +
+
+
+
+
NVQ Level 5
+ Qualification +
+
+
+
+
+ +
+ +
+
+ + +@endsection \ No newline at end of file diff --git a/resources/views/profile.blade.php b/resources/views/profile.blade.php new file mode 100644 index 0000000..5f525f4 --- /dev/null +++ b/resources/views/profile.blade.php @@ -0,0 +1,176 @@ +@extends('layouts.app') + +@section('content') + + +
+
+
+ + + @if(session('success')) + + @endif + + +
+ + +
+

User Profile Dashboard

+
+ +
+ +
+
Full Name:
+
{{ $user->first_name . ' ' . $user->last_name }}
+
+ + +
+
Email Address:
+
{{ $user->email }}
+
+ + +
+
Phone Number:
+
+ {{ $user->phone ?? 'Not Provided' }} +
+
+ + +
+
Account Created:
+
+ {{ $user->created_at ? $user->created_at->format('Y-m-d H:i') : 'N/A' }} +
+
+ + +
+
Last Updated:
+
+ {{ $user->updated_at ? $user->updated_at->format('Y-m-d H:i') : 'N/A' }} +
+
+ + +
+ +
+ +
+
+
+ +
+
+
+
+@endsection + + + + + + \ No newline at end of file diff --git a/resources/views/results.blade.php b/resources/views/results.blade.php new file mode 100644 index 0000000..c0bad4e --- /dev/null +++ b/resources/views/results.blade.php @@ -0,0 +1,528 @@ +@extends('layouts.studentportalnav') + +@section('title','Results') + +@section('content') + + + +
+ + + +
+ +

+ + + + Academic Results + +

+ +

+ + View your examination results and academic performance. + +

+ +
+ + + +
+ +
+ +
+ + + +

82%

+ + Overall Average + +
+ +
+ +
+ +
+ + + +

3.65

+ + Current GPA + +
+ +
+ +
+ +
+ + + +

6 / 6

+ + Modules Passed + +
+ +
+ +
+ + + +
+ +
+ +

+ + Semester Results + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ModuleMarksGradeStatus
Engine Technology91 + + + + A+ + + + + Pass
Brake Systems84 + + + + A + + + + Pass
Electrical Systems79 + + + + B+ + + + + Pass
Transmission Systems74 + + + + B + + + + Pass
Workshop Practice88 + + + + A + + + + Pass
Industrial Safety81 + + + + A- + + + + Pass
+ +
+ + + +
+ +
+ +

+ + Overall Performance + +

+ +
+ +
+ +

+ + Course Completion + +

+ +
+ +
+ +
+ +
+ +

+ + Attendance Score + +

+ +
+ +
+ +
+ +
+ +
+ +
+ + + +
+ +
+ +

+ + Download Official Result Sheet + +

+ +

+ + Download your latest semester examination results in PDF format. + +

+ +
+ + + +
+ +
+ +@endsection \ No newline at end of file diff --git a/resources/views/students.blade.php b/resources/views/students.blade.php index 45bc4e1..9fdc9f1 100644 --- a/resources/views/students.blade.php +++ b/resources/views/students.blade.php @@ -81,7 +81,8 @@ body { box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); } -/* Modal එක Open වෙද්දී Zoom-In වෙන්න */ + + .modal.fade .modal-dialog { transform: scale(0.85); transition: transform 0.3s ease-out; @@ -235,7 +236,7 @@ body {

- +
@@ -307,7 +308,6 @@ body {

Quick Links

-
Academic Calendar diff --git a/resources/views/timetable.blade.php b/resources/views/timetable.blade.php new file mode 100644 index 0000000..910f359 --- /dev/null +++ b/resources/views/timetable.blade.php @@ -0,0 +1,386 @@ +@extends('layouts.studentportalnav') + +@section('title', 'My Timetable') + +@section('content') + + + + + + + + + + + + +
+ + + + + +
+ +
+ +
+ +
+ + Today's Classes +
+ +
+ + 08:30 - 10:30
+ + + Theory + + + Engine Fundamentals + +
+ +
+ + 10:45 - 12:30
+ + + Workshop + + + Practical Session + +
+ +
+ + 01:30 - 03:30
+ + + Practical + + + Electrical System + +
+ +
+ +
+ +
+ +
+ +
+ + Timetable Legend +
+ +
+ + + Theory + + + + Practical + + + + Workshop + + + + Break + + +
+ +
+ +

+ Please arrive at least 15 minutes before each class. + Attendance is compulsory for all practical sessions. +

+ +
+ +
+ +
+ + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TimeMondayTuesdayWednesdayThursdayFriday
08:30 - 10:30 + Theory
+ Engine Fundamentals +
+ Practical
+ Engine Lab +
+ Theory
+ Transmission +
+ Workshop
+ Engine Repair +
+ Theory
+ Vehicle Safety +
10:45 - 12:30 + Workshop
+ Service Practice +
+ Theory
+ Electrical +
+ Practical
+ Diagnostics +
+ Theory
+ Fuel System +
+ Workshop
+ Engine Assembly +
12:30 - 01:30 + 🍴 LUNCH BREAK +
01:30 - 03:30 + Practical
+ Electrical System +
+ Workshop
+ Welding +
+ Theory
+ Auto Electronics +
+ Practical
+ Brake System +
+ Theory
+ Revision +
+ +
+ +
+ +
+ +@endsection \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 994800a..dd4a1b6 100644 --- a/routes/web.php +++ b/routes/web.php @@ -2,7 +2,7 @@ use Illuminate\Support\Facades\Route; use App\Http\Controllers\AuthController; -use App\Http\Controllers\StudentPortalController; // නිවැරදි Controller නමය +use App\Http\Controllers\StudentPortalController; /* |-------------------------------------------------------------------------- @@ -15,16 +15,26 @@ Route::get('/', function () { return view('welcome'); }); + + +Route::put('/profile/update', [AuthController::class, 'update'])->name('profile.update')->middleware('auth'); + +Route::middleware(['auth'])->group(function () { + Route::get('/profile', [AuthController::class, 'profilview'])->name('profile.view'); +}); + // Authentication Routes Route::post('/signuppage', [AuthController::class, 'register']); Route::post('/signin', [AuthController::class, 'login']); Route::post('/custom-logout', [AuthController::class, 'logout']); + // --- STUDENT PORTAL SYSTEM ROUTES --- Route::post('/student-login', [StudentPortalController::class, 'studentlogin'])->name('student.login.submit'); // Route::get('/student-login', [StudentPortalController::class, 'studentlogin'])->name('student.login.submit'); + Route::get('/student-portal', function () { @@ -46,5 +56,16 @@ Route::view('/students', 'students')->name('students'); Route::view('/abouts', 'abouts')->name('abouts'); Route::view('/contact', 'contacts')->name('contact'); + Route::view('/signin', 'signin')->name('signin'); -Route::view('/signup', 'signup')->name('signup'); \ No newline at end of file +Route::view('/signup', 'signup')->name('signup'); + +//student protal +Route::view('/Dashboard','StudentPortal')->name('Dashboard'); +Route::view('/mycourse', 'mycourse')->name('mycourse'); +Route::view('/timetable','timetable')->name('timetable'); +Route::view('/Assignments','Assignments')->name('Assignments'); +Route::view('/Studentguidelines','Studentguidelines')->name('Studentguidelines'); +Route::view('/results','results')->name('results'); +Route::view('/Feedback&Complain','Feedback&Complain')->name('Feedback&Complain'); +Route::view('/StudentProfile','StudentProfile')->name('StudentProfile'); \ No newline at end of file