Skip to content

Commit

Permalink
#27, Code for the frontend of AddingQuestion is done
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenraam committed Oct 23, 2024
1 parent 01d14cb commit e354a1e
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 6 deletions.
8 changes: 8 additions & 0 deletions Alumni-Project/app/Http/Controllers/ForumContoller.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,12 @@
class ForumContoller extends Controller
{
//

public function viewQuestions(){
return view('forum.viewQuestion');
}

public function createQuestion(){
return view('forum.addQuestion');
}
}
58 changes: 58 additions & 0 deletions Alumni-Project/resources/views/forum/addQuestion.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@extends('layouts.app')
@section('title', 'Add Questions')

@push('bodycontent')
<section>

<style>
/* Add any custom CSS styling here */
</style>

<div class="gap gray-bg">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="row merged20" id="page-contents">
@include('layouts.includes.sidebar')
<div class="col-lg-9">
<div class="central-meta">
<div class="frnds">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="active" href="" data-toggle="tab">Add Question</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active fade show">
<ul class="nearby-contct">
<li>
<form action="" method="POST">
@csrf <!-- Include this to protect against CSRF attacks -->

<div class="form-group">
<input type="text" name="title" id="title" required>
<label for="title" class="control-label">Question Title</label>
<i class="mtrl-select"></i>
</div>


<div class="form-group">
<textarea type="text" name="body" id="body" required></textarea>
<label for="title" class="control-label">Question Body</label>
<i class="mtrl-select"></i>
</div>

<button type="submit" class="mtr-btn"><span>Add </span></button>
</form>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
@endpush
10 changes: 5 additions & 5 deletions Alumni-Project/resources/views/jobs/form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
</div>
<form action="{{Route('jobOpenings.insert')}}" method="POST">
@csrf
<div class="form-group">
<input type="text" name="title" id="title"
required="required">
<label class="control-label" for="title">Job Title</label>
<i class="mtrl-select"></i>
<div class="form-group">
<input type="text" name="title" id="title"
required="required">
<label class="control-label" for="title">Job Title</label>
<i class="mtrl-select"></i>
</div>
<div class="form-group">
<textarea name="description" id="description" required="required"></textarea>
Expand Down
8 changes: 7 additions & 1 deletion Alumni-Project/routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use App\Http\Controllers\PostController;
use App\Http\Controllers\EventStudentController;
use App\Http\Controllers\ForgotPasswordController;
use App\Http\Controllers\ForumContoller;
use App\Http\Controllers\PostReportsController;
use App\Http\Controllers\LogoutController;
use App\Http\Controllers\MentorshipController;
Expand Down Expand Up @@ -105,7 +106,7 @@
Route::delete('/tasks/{id}', [TaskController::class, 'destroy'])->name('tasks.destroy');

// Forum
// Route::get('/admin/forum');
Route::get('/admin/forum',[]);

// View Password reset requests
Route::get('/admin/forgot-password-requests', [ForgotPasswordController::class, 'index'])->name('admin.forgot-password-requests');
Expand Down Expand Up @@ -164,6 +165,11 @@
// Delete Task
Route::delete('/tasks/{id}', [TaskController::class, 'destroy'])->name('tasks.destroy');


// View Forum
Route::get('/alumni/forum',[ForumContoller::class,'viewQuestions']);
Route::get('/alumni/forum/add',[ForumContoller::class,'createQuestion']);

// Change password
Route::get('/alumni/change-password',[AlumniLoginController::class,'showChangePasswordForm'])->name('alumni.change-password.form');
Route::post('/alumni/change-password', [AlumniLoginController::class,'updatePassword'])->name('alumni.change-password.update');
Expand Down

0 comments on commit e354a1e

Please sign in to comment.