diff --git a/app/Http/Controllers/ContactMsgController.php b/app/Http/Controllers/ContactMsgController.php new file mode 100644 index 0000000..feb24c9 --- /dev/null +++ b/app/Http/Controllers/ContactMsgController.php @@ -0,0 +1,27 @@ +validate([ + 'name' => 'required|string|max:255', + 'email' => 'required|email|max:255', + 'subject' => 'required|string|max:255', + 'message' => 'required|string', + ]); + + + ContactMsg::create($validatedData); + + + return redirect()->back()->with('success', 'Message sent successfully!'); + } +} diff --git a/app/Http/Controllers/FeedbackController.php b/app/Http/Controllers/FeedbackController.php new file mode 100644 index 0000000..a799d48 --- /dev/null +++ b/app/Http/Controllers/FeedbackController.php @@ -0,0 +1,49 @@ +validate([ +// 'feedback_type' => 'required', +// 'subject' => 'required|string|max:255', +// 'feedback_text' => 'required|string', +// ]); + +// // 2. Automatically inject the logged-in user's ID +// $validatedData['user_id'] = auth()->id(); + +// // 3. Save to database +// Feedback::create($validatedData); + +// return redirect()->back()->with('success', 'Feedback submitted successfully!'); +// } + +public function feedback(Request $request) +{ + + $request->validate([ + 'feedback_type' => 'required', + 'subject' => 'required|string|max:255', + 'feedback_text' => 'required|string', + ]); + + + Feedback::create([ + 'user_id' => auth()->id(), + 'feedback_type' => $request->feedback_type, + 'subject' => $request->subject, + 'feedback_text' => $request->feedback_text, + 'status' => 'Pending', + ]); + + return redirect()->back()->with('success', 'Feedback submitted successfully!'); +} +} diff --git a/app/Http/Controllers/studentsController.php b/app/Http/Controllers/studentsController.php index cbe503e..eebb13f 100644 --- a/app/Http/Controllers/studentsController.php +++ b/app/Http/Controllers/studentsController.php @@ -3,8 +3,9 @@ namespace App\Http\Controllers; use Illuminate\Http\Request; +use Illuminate\Support\Facades\DB; class studentsController extends Controller { - // + } diff --git a/app/Models/ContactMsg.php b/app/Models/ContactMsg.php new file mode 100644 index 0000000..8ae75af --- /dev/null +++ b/app/Models/ContactMsg.php @@ -0,0 +1,17 @@ +id(); + $table->string('name'); + $table->string('email'); + $table->string('subject'); + $table->text('message'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('contact_msgs'); + } +}; diff --git a/database/migrations/2026_07_14_065128_create_feedback_table.php b/database/migrations/2026_07_14_065128_create_feedback_table.php new file mode 100644 index 0000000..56630b3 --- /dev/null +++ b/database/migrations/2026_07_14_065128_create_feedback_table.php @@ -0,0 +1,33 @@ +id(); + + $table->foreignId('user_id')->constrained()->onDelete('cascade'); + $table->string('feedback_type'); + $table->string('subject'); + $table->text('feedback_text'); + $table->string('status')->default('Pending'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('feedback'); + } +}; diff --git a/database/migrations/2026_07_14_093918_create_student_details_table.php b/database/migrations/2026_07_14_093918_create_student_details_table.php new file mode 100644 index 0000000..15faea8 --- /dev/null +++ b/database/migrations/2026_07_14_093918_create_student_details_table.php @@ -0,0 +1,42 @@ +id(); + $table->string('student_id')->unique(); + $table->string('image')->nullable(); + $table->string('full_name'); + $table->string('nic_passport'); + $table->date('date_of_birth'); + $table->string('gender'); + $table->string('email')->unique(); + $table->string('phone'); + $table->string('qualification'); + $table->string('institute'); + $table->year('year_completed'); + $table->string('course_name'); + $table->string('duration'); + $table->string('current_semester'); + $table->string('trainer_name'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('student_details'); + } +}; diff --git a/resources/views/Assignments.blade.php b/resources/views/Assignments.blade.php index b26d529..bfc0e98 100644 --- a/resources/views/Assignments.blade.php +++ b/resources/views/Assignments.blade.php @@ -29,7 +29,7 @@ body{ } .assignment-header{ - background:linear-gradient(135deg,#0d6efd,#4f46e5); + background:linear-gradient(135deg,#5E244E,#4a1c3e); color:white; padding:18px; } @@ -88,6 +88,7 @@ body{ .btn-submit{ border-radius:50px; padding:10px 22px; + } .search-box{ @@ -104,11 +105,11 @@ body{ -
+
-

- +

+ Assignments

@@ -133,7 +134,7 @@ body{
- + diff --git a/resources/views/Feedback&Complain.blade.php b/resources/views/Feedback&Complain.blade.php index 99284ec..1ad695e 100644 --- a/resources/views/Feedback&Complain.blade.php +++ b/resources/views/Feedback&Complain.blade.php @@ -5,585 +5,302 @@ @section('content') - -
- - - -
- - - - +
- - - -
- - - - - - +
- - - -
- -
- - - - - - - - +
- -
- - -

- - - - Previous Requests - -

- - +

Previous Requests

- -
- - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - -
- Type - - Subject - - Date - - Status -
Type Subject Date Status
- Feedback - - Workshop Equipment - - 10 July 2026 - - - - - Resolved - - - - -
- Complaint - - Class Schedule Issue - - 05 July 2026 - - - - - Pending - - - - -
FeedbackWorkshop Equipment 10 July 2026 Resolved
ComplaintClass 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 ebd6f43..0dc932d 100644 --- a/resources/views/StudentPortal.blade.php +++ b/resources/views/StudentPortal.blade.php @@ -1,671 +1,306 @@ @extends('layouts.studentportalnav') -@section('title', 'Dashboard') +@section('title','Dashboard') @section('content') - - - - - -.input-group:focus-within .input-group-text { - border-color: var(--secondary); - color: var(--secondary); -} +
-.modal-footer { - background: transparent; - border-top: none; - padding: 0 25px 30px; -} - - - +
- +
+

Welcome Back, {{ Auth::user()->first_name }}

+

Manage your academic activities from your dashboard.

+
- - -
-
-
- -

Welcome back, Imaa

-

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

-
-
- -
N
-
-
- - -
-
- -
-
-
6
-
Enrolled Courses
-
- -
-
-
-
-
3
-
Pending Assignments
-
-
-
-
-
-
78%
-
Average Result
-
-
-
-
-
-
2
-
Examination Notices
-
-
-
- - - - \ No newline at end of file + + +
+ +
+
+ +
+ +
+ +

6

+

Enrolled Courses

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

3

+

Assignments

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

78%

+

Average Result

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

2

+

Exam Notices

+ +
+
+ +
+ + + +
+Student Services +
+ +
+ +
+ +@endsection \ No newline at end of file diff --git a/resources/views/StudentProfile.blade.php b/resources/views/StudentProfile.blade.php index b0b49f4..25fa59b 100644 --- a/resources/views/StudentProfile.blade.php +++ b/resources/views/StudentProfile.blade.php @@ -224,204 +224,106 @@ body{ -
- - -
- - - + +

Kasun Perera

- - -

- - Kasun Perera - -

- - - - - + Student ID : AEA20260045 - - - -
- - - - - +
- - -
- - - - +
- -
- -
- -

- - Personal Information -

- -
- Full Name - - Kasun Perera + Kasuni Perera -
- -
- NIC / Passport - 200012345678 -
- -
- Date of Birth - 15 March 2000 -
- -
- Gender - Male -
- -
- Email - student@email.com -
- -
- Phone - +94 77 1234567 -
- -
- -
- -
- - - - - -
+ - -
- -
- -

- - Educational Background -

- - - -
- Qualification @@ -429,43 +331,29 @@ body{ NVQ Level 4 -
- - -
- Institute - ABC Technical College -
- Year Completed - 2025 -
- -
- -
@@ -477,72 +365,24 @@ body{
- -
+

Course Details

+
+ Diploma in Automobile Engineering
+
Duration : 2 Years
-

- - - - Course Details - -

- - - -
- - - - Diploma in Automobile Engineering - -
- - - -
- - - - Duration : 2 Years - -
- - - -
- - - - Current Semester : Semester 2 - -
- - - -
+
+ Current Semester : Semester 2 +
+
- Trainer : Mr. Nimal Silva -
- - -
- -
- - -
- - -
diff --git a/resources/views/apply.blade.php b/resources/views/apply.blade.php index 464dd62..7e0db7f 100644 --- a/resources/views/apply.blade.php +++ b/resources/views/apply.blade.php @@ -65,7 +65,7 @@ } .section-title { - background: var(--primary); + background: #735D6D; color: white; padding: 8px 12px; margin-top: 22px; diff --git a/resources/views/contacts.blade.php b/resources/views/contacts.blade.php index 180f8c0..5c97db8 100644 --- a/resources/views/contacts.blade.php +++ b/resources/views/contacts.blade.php @@ -82,7 +82,7 @@ body { box-shadow: 0 10px 25px rgba(94, 36, 78, 0.08); } -/* Icons වල පාට වෙනස් කිරීම */ + .info-card i { color: var(--primary) !important; } @@ -96,17 +96,17 @@ body { transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1); } -/* 1. පල්ලෙහා ඉඳන් උඩට (Hero & Map) */ + .fade-up-init { transform: translateY(30px); } -/* 2. වමේ ඉඳන් දකුණට (Form එක සඳහා) */ + .slide-left-init { transform: translateX(-40px); } -/* 3. එකපාර (Fade In) මතු වෙන්න (Info Cards සඳහා) */ + .fade-in-init { transform: scale(0.98); } @@ -140,7 +140,16 @@ body {

Send Message

-
+ + +@if(session('success')) +
+ {{ session('success') }} +
+@endif + + + @csrf
@@ -172,7 +181,7 @@ Send Message
- +
diff --git a/resources/views/layouts/studentportalnav.blade.php b/resources/views/layouts/studentportalnav.blade.php index 6ab24f4..21554f6 100644 --- a/resources/views/layouts/studentportalnav.blade.php +++ b/resources/views/layouts/studentportalnav.blade.php @@ -7,15 +7,16 @@ + @@ -175,7 +188,7 @@ body {
-
+

Diploma in Automotive Engineering

@@ -200,7 +213,7 @@ body {
Course Image
-
+

AE101

@@ -227,8 +240,8 @@ body {

-
-

+
+

Course Modules

@@ -240,7 +253,7 @@ body {
-
+
Engine Fundamentals
Completed
@@ -258,7 +271,7 @@ body {
-
+
Transmission Systems
In Progress
@@ -276,7 +289,7 @@ body {
-
+
Brake Systems
Locked
@@ -294,7 +307,7 @@ body {
-
+
Hybrid Technology
Locked
diff --git a/resources/views/students.blade.php b/resources/views/students.blade.php index 9fdc9f1..af4d44e 100644 --- a/resources/views/students.blade.php +++ b/resources/views/students.blade.php @@ -239,7 +239,7 @@ body {
-
+
@@ -249,7 +249,7 @@ body {
-
+
@@ -259,7 +259,7 @@ body {
-
+
@@ -269,7 +269,7 @@ body {
-
+
@@ -279,7 +279,7 @@ body {
-
+
@@ -289,7 +289,7 @@ body {
-
+
@@ -304,11 +304,11 @@ body {
-
+

Quick Links

-
+
@@ -409,4 +409,6 @@ document.addEventListener('DOMContentLoaded', function () { }); + + @endsection \ No newline at end of file diff --git a/resources/views/timetable.blade.php b/resources/views/timetable.blade.php index 910f359..6c3f39b 100644 --- a/resources/views/timetable.blade.php +++ b/resources/views/timetable.blade.php @@ -20,10 +20,11 @@ body{ } .page-header{ - background:linear-gradient(135deg,#0d6efd,#0a58ca); + background:linear-gradient(135deg,#9954b8,#4f3d5b)); color:#fff; padding:45px; border-radius:20px; + background-color: #5E244E; margin-bottom:30px; } diff --git a/routes/web.php b/routes/web.php index dd4a1b6..e6089ef 100644 --- a/routes/web.php +++ b/routes/web.php @@ -3,6 +3,8 @@ use Illuminate\Support\Facades\Route; use App\Http\Controllers\AuthController; use App\Http\Controllers\StudentPortalController; +use App\Http\Controllers\ContactMsgController; +use App\Http\Controllers\FeedbackController; /* |-------------------------------------------------------------------------- @@ -15,7 +17,9 @@ Route::get('/', function () { return view('welcome'); }); +Route::post('/feedback/store', [FeedbackController::class, 'feedback']) ->middleware('auth') ->name('feedback.store'); +Route::post('/contact-submit', [ContactMsgController::class, 'store'])->name('contact.store'); Route::put('/profile/update', [AuthController::class, 'update'])->name('profile.update')->middleware('auth');