Student Services
-- Everything you need during your academic journey. -
-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{ -
- - Share your suggestions, feedback, or complaints with the - Automobile Engineering Academy management team. - -
- - +Share your suggestions, feedback, or complaints with the + Automobile Engineering Academy management team.
| - Type - | - -- Subject - | - -- Date - | - -- Status - | - - -
|---|---|---|---|
| Type | +Subject | +Date | +Status | +
| - Feedback - | - - -- Workshop Equipment - | - - -- 10 July 2026 - | - - -- - - - Resolved - - - - - | - - -
| - Complaint - | - - -- Class Schedule Issue - | - - -- 05 July 2026 - | - - -- - - - Pending - - - - - | - - -
| Feedback | +Workshop Equipment | +10 July 2026 | +Resolved | +
| Complaint | +Class Schedule Issue | +05 July 2026 | +Pending | +
Manage your academic activities from your dashboard.
+- Everything you need during your academic journey. -
-