Project Completed - 100%

parent 85872d7b
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
/public/storage /public/storage
/storage/*.key /storage/*.key
/vendor /vendor
public
.env .env
.env.backup .env.backup
.phpunit.result.cache .phpunit.result.cache
...@@ -11,3 +10,4 @@ Homestead.json ...@@ -11,3 +10,4 @@ Homestead.json
Homestead.yaml Homestead.yaml
npm-debug.log npm-debug.log
yarn-error.log yarn-error.log
/public
\ No newline at end of file
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Document extends Model
{
//
}
...@@ -4,82 +4,80 @@ namespace App\Http\Controllers; ...@@ -4,82 +4,80 @@ namespace App\Http\Controllers;
use App\Classes; use App\Classes;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Teacher;
class ClassesController extends Controller class ClassesController extends Controller
{ {
/** public function createNewClass(Request $classDetails) {
* Display a listing of the resource. $class_table = new Classes;
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
/** if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
* Show the form for creating a new resource. if ($classDetails->className != null && $classDetails->teacherId) {
* $class_table->name = $classDetails->className;
* @return \Illuminate\Http\Response $class_table->teacher_id = $classDetails->teacherId;
*/ $class_table->save();
public function create()
{ Session()->flash('classStatus', "Class Added Successfully!.");
// return redirect('/admin_board');
} else {
Session()->flash('classStatus', "Please Fill All Feilds");
return redirect('/admin_board');
}
} else {
return redirect('/login');
}
} }
/** public function getAllClasses() {
* Store a newly created resource in storage. $data = DB::table('classes')->select('classes.id','classes.name','classes.teacher_id','teachers.username')
* ->join('teachers', 'classes.teacher_id', '=', 'teachers.id')->get();
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response $all_subjects = json_decode($data, true);
*/ if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
public function store(Request $request) return view('all_classes')->with('classes', $all_subjects);
{ } else {
// return redirect('/login');
}
} }
/** public function showUpdateClassForm($id) {
* Display the specified resource. $data = DB::table('classes')->select('classes.id','classes.name','classes.teacher_id','teachers.username')
* ->join('teachers', 'classes.teacher_id', '=', 'teachers.id')
* @param \App\Classes $classes ->where('classes.id', '=', $id)
* @return \Illuminate\Http\Response ->get();
*/ $all_teachers = Teacher::select('*')->get();
public function show(Classes $classes) //dd($data);
{ $selected_classDetails = json_decode($data, true);
// //dd($selected_classDetails);
if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
return view('update_classes')->with(['selected_classDetails'=>$selected_classDetails, 'all_teachers'=>$all_teachers]);
} else {
return redirect('/login');
}
} }
/** public function updateSelectedClassDetails(Request $requestClassDetails) {
* Show the form for editing the specified resource. if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
* Classes::where('id', $requestClassDetails->classId)->update([
* @param \App\Classes $classes 'name'=>$requestClassDetails->className,
* @return \Illuminate\Http\Response 'teacher_id'=>$requestClassDetails->teacherId
*/ ]);
public function edit(Classes $classes)
{
//
}
/** Session()->flash('classStatus', "Class Details Update Successfully.");
* Update the specified resource in storage. return redirect('/admin_board');
* } else {
* @param \Illuminate\Http\Request $request return redirect('/login');
* @param \App\Classes $classes }
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Classes $classes)
{
//
} }
/** public function deleteSelectedClassDetails($id) {
* Remove the specified resource from storage. if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
* Classes::where('id', $id)->delete();
* @param \App\Classes $classes
* @return \Illuminate\Http\Response return redirect('/all_classes');
*/ } else {
public function destroy(Classes $classes) return redirect('/login');
{ }
//
} }
} }
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Classes;
use App\Subject;
use App\Lesson;
use App\Document;
class DocumentController extends Controller
{
public function showAddDocumentPage() {
$available_classes = Classes::select('*')->get();
$data = DB::table('documents')->select('documents.id','documents.document_title','documents.document_name','lessons.lesson_name')
->join('lessons', 'lessons.id', '=', 'documents.lesson_id')
->get();
// dd($available_classes);
$available_documents = json_decode($data, true);
if (Session()->get('teacherStatus')) {
return view('lecture_documents')->with(['classes'=>$available_classes, 'documents'=>$available_documents]);
} else {
return redirect('/login');
}
}
public function findSubjectsForDocumentAdd(Request $request) {
if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
$data = Subject::select('*')->where('class_id', $request->id)->get();
return response()->json($data);
} else {
return redirect('/login');
}
}
public function findLessonsForDocumentAdd(Request $request) {
if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
$data = Lesson::select('*')->where('subject_id', $request->id)->get();
return response()->json($data);
} else {
return redirect('/login');
}
}
public function uploadSelectedDocuments(Request $request) {
// dd($request);
$document_table = new Document();
if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
if ($request->documentTitle && $request->classGrade && $request->classGrade && $request->lessonName && $request->fileName) {
$document_table->document_title = $request->documentTitle;
$document_table->class_id = $request->classGrade;
$document_table->lesson_id = $request->lessonName;
$file = $request->fileName;
$get_file_name = date('YmdHi').$file->getClientOriginalName();
$file-> move(public_path('public/documents'), $get_file_name);
$document_table->document_name = $get_file_name;
$document_table->save();
Session()->flash('status', 'Document Added Successfully.');
return redirect('/add-documents');
} else {
Session()->flash('status', 'Please Fill All Feilds.');
return redirect('/add-documents');
}
} else {
return redirect('/login');
}
}
public function deleteSelectedDocument($id) {
if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
Document::where('id',$id)->delete();
return redirect('/add-documents');
} else {
return redirect('/login');
}
}
}
...@@ -12,9 +12,9 @@ use App\Comment; ...@@ -12,9 +12,9 @@ use App\Comment;
class GenerateSummeryController extends Controller class GenerateSummeryController extends Controller
{ {
function generateSummery(Request $lessonDetails) { function generateSummery(Request $lessonDetails) {
// return redirect()->back(); //return redirect()->back();
set_time_limit(0); set_time_limit(0);
$token = '02jT906QhCc3y2EiJWB48MGV4JAt5U1et15PUfl1cdIqLwuXFU_sq1YhpfQU0Ts58YOZ3dMRz2uL65jo-U6wxOa7RfXoo'; $token = '02euWC6nQET9fHiW9x0514E27jz_qOrB__oPdocxYJzoHqx3cXn6UkAPQKUkfAK9ATFf9sm1o7UWhGk01oIAqvZUI590k';
$file = base_path() . "/" . $lessonDetails->lessonLink; $file = base_path() . "/" . $lessonDetails->lessonLink;
// create client // create client
...@@ -60,7 +60,7 @@ class GenerateSummeryController extends Controller ...@@ -60,7 +60,7 @@ class GenerateSummeryController extends Controller
} }
$plain_text = ''; $plain_text = '';
$token = '02jT906QhCc3y2EiJWB48MGV4JAt5U1et15PUfl1cdIqLwuXFU_sq1YhpfQU0Ts58YOZ3dMRz2uL65jo-U6wxOa7RfXoo'; $token = '02euWC6nQET9fHiW9x0514E27jz_qOrB__oPdocxYJzoHqx3cXn6UkAPQKUkfAK9ATFf9sm1o7UWhGk01oIAqvZUI590k';
// create client // create client
$client = new Client([ $client = new Client([
...@@ -79,67 +79,14 @@ class GenerateSummeryController extends Controller ...@@ -79,67 +79,14 @@ class GenerateSummeryController extends Controller
// decode response JSON and print // decode response JSON and print
$hugeArray = json_decode($response, true); $hugeArray = json_decode($response, true);
foreach ($hugeArray["monologues"][0]["elements"] as $key) { //dd(count($hugeArray["monologues"]));
$plain_text = $plain_text . $key["value"]; for ($index = 0; $index < count($hugeArray["monologues"]); ++$index) {
foreach ($hugeArray["monologues"][$index]["elements"] as $key) {
$plain_text = $plain_text . $key["value"];
}
} }
$response = $client->get('https://api.meaningcloud.com/summarization-1.0', [
'multipart' => [
[
'name' => 'key',
'contents' => 'dfdcde27a7a2cdcf21ca08e9c492c3f4'
],
[
'name' => 'txt',
'contents' => $plain_text
],
[
'name' => 'sentences',
'contents' => 20
]
]
]);
$status = $response->getStatusCode();
$body = json_decode($response->getBody()->getContents(), true);
Session()->flash("decoded_summery", $body['summary']); Session()->flash("decoded_summery", $plain_text);
// dd($body['summary']);
//return redirect('lesson/', $lessonDetails->lessonId);
// $curl = curl_init();
// curl_setopt_array($curl, [
// CURLOPT_URL => "https://paraphrase-genius.p.rapidapi.com/dev/paraphrase/",
// CURLOPT_RETURNTRANSFER => true,
// CURLOPT_FOLLOWLOCATION => true,
// CURLOPT_ENCODING => "",
// CURLOPT_MAXREDIRS => 10,
// CURLOPT_TIMEOUT => 30,
// CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
// CURLOPT_CUSTOMREQUEST => "POST",
// CURLOPT_POSTFIELDS => "{\r
// \"text\": \"RapidAPI is a backend development platform that let's app & web developers create the backend for their apps using existing functional blocks. The company was founded in Tel Aviv by Iddo Gino and Mickey Haslavsky on January 2015. It has since received investments from angel investors including Dov Moran (founded of M-Systems), Marius Nacht (co-founder of Checkpoint) amongst others. RapidAPI has also received investment from the 500 Startups accelerator, partaking in its 16th batch in San Francisco.\",\r
// \"result_type\": \"multiple\"\r
// }",
// CURLOPT_HTTPHEADER => [
// "X-RapidAPI-Host: paraphrase-genius.p.rapidapi.com",
// "X-RapidAPI-Key: 8745f7a6bamsha8a51bdef3714a5p14ba86jsnd890c3f1087c",
// "content-type: application/json"
// ],
// ]);
// $response = curl_exec($curl);
// $err = curl_error($curl);
// curl_close($curl);
// if ($err) {
// dd($err);
// } else {
// dd($response);
// }
// //Session()->flash("decoded_summery", $body['summary']);
return redirect()->back(); return redirect()->back();
} else { } else {
......
...@@ -8,9 +8,39 @@ use Illuminate\Support\Facades\DB; ...@@ -8,9 +8,39 @@ use Illuminate\Support\Facades\DB;
use App\Subject; use App\Subject;
use App\Classes; use App\Classes;
use App\Comment; use App\Comment;
use App\Document;
use App\VideoModel;
use Redirect;
class LessonController extends Controller class LessonController extends Controller
{ {
function calculateLessonVideoViewCount($id) {
$vedioModel = new VideoModel();
if (Session()->has('member')) {
$userId = Session()->get('member')['id'];
} else if (Session()->has('teacherStatus')) {
$userId = Session()->get('teacherStatus')['id'];
} else {
$userId = null;
}
$checkExist = VideoModel::select('*')->where(['userId'=>$userId, 'lessonId'=>$id])->first();
if (empty($checkExist)) {
$vedioModel->userId = $userId;
$vedioModel->lessonId = $id;
$vedioModel->save();
}
return Redirect::back()->with('message','Operation Successful !');
}
function getLessonVideoViewCount($id) {
}
function showAddlessonForm(){ function showAddlessonForm(){
$available_classes = Classes::select('*')->get(); $available_classes = Classes::select('*')->get();
$available_subjects = Subject::select('*')->distinct()->get(); $available_subjects = Subject::select('*')->distinct()->get();
...@@ -29,33 +59,43 @@ class LessonController extends Controller ...@@ -29,33 +59,43 @@ class LessonController extends Controller
if($lessonDetails){ if($lessonDetails){
//dd($lessonDetails); //dd($lessonDetails);
//dd( $lessonDetails->subjectName); //dd( $lessonDetails->subjectName);
$lesson_table->subject_id = $lessonDetails->subjectName; if ( $lessonDetails->subjectName != null && $lessonDetails->lessonName && $lessonDetails->lessonThumbnail) {
$lesson_table->lesson_name = $lessonDetails->lessonName; $lesson_table->subject_id = $lessonDetails->subjectName;
$lesson_table->lesson_name = $lessonDetails->lessonName;
$file = $lessonDetails->lessonThumbnail;
$get_thumbnail_file_name = date('YmdHi').$file->getClientOriginalName(); $file = $lessonDetails->lessonThumbnail;
$file-> move(public_path('public/Image'), $get_thumbnail_file_name); $get_thumbnail_file_name = date('YmdHi').$file->getClientOriginalName();
$lesson_table->lesson_thumbnail = $get_thumbnail_file_name; $file-> move(public_path('public/Image'), $get_thumbnail_file_name);
$lesson_table->platform_link = empty($lessonDetails->platformLink) ? "N" : ($lessonDetails->platformLink); $lesson_table->lesson_thumbnail = $get_thumbnail_file_name;
$lesson_table->platform_link = empty($lessonDetails->platformLink) ? "N" : ($lessonDetails->platformLink);
// $link_arr = explode("=", $lessonDetails->lessonLink);
// $lesson_table->lesson_vedio_link = "https://www.youtube.com/embed/".$link_arr[1]; // $link_arr = explode("=", $lessonDetails->lessonLink);
//dd($lessonDetails); // $lesson_table->lesson_vedio_link = "https://www.youtube.com/embed/".$link_arr[1];
if (empty($lessonDetails->platformLink)) { //dd($lessonDetails);
$vedio_file = $lessonDetails->lessonLink; if (empty($lessonDetails->platformLink)) {
$get_vedio_file_name = $vedio_file->getClientOriginalName(); $vedio_file = $lessonDetails->lessonLink;
$vedio_file-> move(public_path('public/vedios'), $get_vedio_file_name); $get_vedio_file_name = $vedio_file->getClientOriginalName();
$lesson_table->lesson_vedio_link = $get_vedio_file_name; $vedio_file-> move(public_path('public/vedios'), $get_vedio_file_name);
$lesson_table->lesson_vedio_link = $get_vedio_file_name;
} else {
$lesson_table->lesson_vedio_link = "N";
$link_arr = explode("=", $lessonDetails->platformLink);
$lesson_table->platform_link = "https://www.youtube.com/embed/".$link_arr[1];
}
Subject::where('id',$lessonDetails->subjectName)
->update([
'teacher_id'=>Session()->get('teacherStatus')['id']
]);
$lesson_table->save();
Session()->flash('status', 'Lesson Added Successfully!.');
return redirect('/add_lesson');
} else { } else {
$lesson_table->lesson_vedio_link = "N"; Session()->flash('status', 'Please Fill All Feilds');
return redirect('/add_lesson');
$link_arr = explode("=", $lessonDetails->platformLink);
$lesson_table->platform_link = "https://www.youtube.com/embed/".$link_arr[1];
} }
$lesson_table->save();
Session()->flash('status', 'Lesson Added Successfully!.');
return redirect('/add_lesson');
}else{ }else{
Session()->flash('status', 'Please Fill All Fields.'); Session()->flash('status', 'Please Fill All Fields.');
return redirect('/add_lesson'); return redirect('/add_lesson');
...@@ -79,15 +119,26 @@ class LessonController extends Controller ...@@ -79,15 +119,26 @@ class LessonController extends Controller
} }
function viewSingleLesson($lesson_id){ function viewSingleLesson($lesson_id){
if (Session()->has('member')) {
$userId = Session()->get('member')['id'];
} else if (Session()->has('teacherStatus')) {
$userId = Session()->get('teacherStatus')['id'];
} else {
$userId = null;
}
$viewCount = VideoModel::select('*')->where(['lessonId'=>$lesson_id])->count();
$get_all_comments = Comment::select('*')->where('lesson_id', $lesson_id)->get(); $get_all_comments = Comment::select('*')->where('lesson_id', $lesson_id)->get();
$data = DB::table('lessons')->select('lessons.id as lesson_id','lessons.lesson_name','lessons.lesson_thumbnail','lessons.lesson_vedio_link','lessons.platform_link','subjects.id as subject_id','subjects.name','teachers.id as techer_id','teachers.username') $data = DB::table('lessons')->select('lessons.id as lesson_id','lessons.lesson_name','lessons.lesson_thumbnail','lessons.lesson_vedio_link','lessons.platform_link','subjects.id as subject_id','subjects.name','teachers.id as techer_id','teachers.username')
->join('subjects', 'subjects.id','=','lessons.subject_id') ->join('subjects', 'subjects.id','=','lessons.subject_id')
->join('teachers', 'teachers.id','=','subjects.teacher_id') ->join('teachers', 'teachers.id','=','subjects.teacher_id')
->where('lessons.id', $lesson_id)->get(); ->where('lessons.id', $lesson_id)->get();
$getDocuments = Document::select('*')->where('lesson_id', $lesson_id)->get();
$lesson_details = json_decode($data, true); $lesson_details = json_decode($data, true);
if(Session()->has('member') || Session()->has('teacherStatus')){ if(Session()->has('member') || Session()->has('teacherStatus')){
return view('lesson_single')->with(['lesson_details'=>$lesson_details, 'all_comments'=>$get_all_comments, 'decoded_summery'=>'']); return view('lesson_single')->with(['lesson_details'=>$lesson_details, 'all_comments'=>$get_all_comments, 'decoded_summery'=>'', 'lessonDocuments'=>$getDocuments, 'userId'=>$userId, 'viewCount'=>$viewCount]);
}else{ }else{
Session()->flash('status', 'Access Denied.'); Session()->flash('status', 'Access Denied.');
return redirect('/login'); return redirect('/login');
...@@ -136,6 +187,7 @@ class LessonController extends Controller ...@@ -136,6 +187,7 @@ class LessonController extends Controller
->get(); ->get();
$lessons = json_decode(json_encode($all_lessons), true); $lessons = json_decode(json_encode($all_lessons), true);
//dd($all_lessons);
return view('all_lessons')->with(['all_lessons'=>$lessons]); return view('all_lessons')->with(['all_lessons'=>$lessons]);
} }
...@@ -150,13 +202,15 @@ class LessonController extends Controller ...@@ -150,13 +202,15 @@ class LessonController extends Controller
//dd($data); //dd($data);
$selectedLesson = json_decode(json_encode($data), true); $selectedLesson = json_decode(json_encode($data), true);
//dd($selectedLesson);
return view('update_lesson')->with(['selected_lesson'=>$selectedLesson, 'all_classes'=>$all_classes]); return view('update_lesson')->with(['selected_lesson'=>$selectedLesson, 'all_classes'=>$all_classes]);
} }
function saveUpdatedLessonDetails(Request $updatedLessonDetails) { function saveUpdatedLessonDetails(Request $updatedLessonDetails) {
if(Session()->has('teacherStatus')){ if(Session()->has('teacherStatus')){
//dd($updatedLessonDetails);
if (($updatedLessonDetails->lessonThumbnail == null)) { if (($updatedLessonDetails->lessonThumbnail == null)) {
$link_arr = explode("=", $updatedLessonDetails->platform_link); $link_arr = explode("=", $updatedLessonDetails->platform_link);
// $lesson_table->platform_link = "https://www.youtube.com/embed/".$link_arr[1]; // $lesson_table->platform_link = "https://www.youtube.com/embed/".$link_arr[1];
...@@ -177,7 +231,7 @@ class LessonController extends Controller ...@@ -177,7 +231,7 @@ class LessonController extends Controller
'subject_id'=>$updatedLessonDetails->subjectName, 'subject_id'=>$updatedLessonDetails->subjectName,
'lesson_name'=>$updatedLessonDetails->lessonName, 'lesson_name'=>$updatedLessonDetails->lessonName,
'lesson_thumbnail'=>$updatedLessonDetails->currentImage, 'lesson_thumbnail'=>$updatedLessonDetails->currentImage,
'lesson_vedio_link'=> $updatedLessonDetails->lesson_vedio_link, 'lesson_vedio_link'=> ($updatedLessonDetails->lesson_vedio_link == null ? $updatedLessonDetails->checkStatusV : $updatedLessonDetails->lesson_vedio_link),
'platform_link'=>$updatedLessonDetails->checkStatusL 'platform_link'=>$updatedLessonDetails->checkStatusL
]); ]);
} }
......
...@@ -20,19 +20,25 @@ class StudentController extends Controller ...@@ -20,19 +20,25 @@ class StudentController extends Controller
return redirect('/admin_board'); return redirect('/admin_board');
} }
else{ else{
if ($studentDetails->pswd != null && $studentDetails->username != null && $studentDetails->email) { if ($studentDetails->pswd != null && $studentDetails->username != null && $studentDetails->email && $studentDetails->con_pswd != null) {
$hashedPassword = Hash::make($studentDetails->pswd); if ($studentDetails->pswd == $studentDetails->con_pswd) {
$hashedPassword = Hash::make($studentDetails->pswd);
$student_table->username = $studentDetails->username;
$student_table->email = $studentDetails->email; $student_table->username = $studentDetails->username;
$student_table->password = $hashedPassword; $student_table->email = $studentDetails->email;
$student_table->password = $hashedPassword;
$student_table->save();
Session()->flash('status', 'Student Registration Successfull. Please Login'); $student_table->save();
Session()->flash('status', 'Student Registration Successfull. Please Login');
return redirect('/admin_board');
} else {
Session()->flash('status', 'Password Doesn\'t Match,');
return redirect('/admin_board'); return redirect('/admin_board');
}
} else { } else {
Session()->flash('status', 'Please Fill All Feiulds Before Registration'); Session()->flash('status', 'Please Fill All Feilds Before Registration');
return redirect('/admin_board'); return redirect('/admin_board');
} }
...@@ -64,7 +70,7 @@ class StudentController extends Controller ...@@ -64,7 +70,7 @@ class StudentController extends Controller
return redirect('/login'); return redirect('/login');
}else{ }else{
Session()->put('member', $fetched_student_result); Session()->put('member', $fetched_student_result);
return redirect('/lessons'); return redirect('/main');
} }
}else if($fetched_teacher_result){ }else if($fetched_teacher_result){
if(!Hash::check($member_details->pswd, $fetched_teacher_result->password)){ if(!Hash::check($member_details->pswd, $fetched_teacher_result->password)){
...@@ -72,10 +78,10 @@ class StudentController extends Controller ...@@ -72,10 +78,10 @@ class StudentController extends Controller
return redirect('/login'); return redirect('/login');
}else if($fetched_teacher_result->role == 'Admin'){ }else if($fetched_teacher_result->role == 'Admin'){
Session()->put('teacherStatus', $fetched_teacher_result); Session()->put('teacherStatus', $fetched_teacher_result);
return redirect('/admin_board'); return redirect('/main');
}else{ }else{
Session()->put('teacherStatus', $fetched_teacher_result); Session()->put('teacherStatus', $fetched_teacher_result);
return redirect('/add_subject'); return redirect('/main');
} }
}else{ }else{
Session()->flash('status', 'Invalid Username or Password'); Session()->flash('status', 'Invalid Username or Password');
......
...@@ -10,9 +10,11 @@ use Session; ...@@ -10,9 +10,11 @@ use Session;
class TeacherController extends Controller class TeacherController extends Controller
{ {
function showAdminDashboard(){ function showAdminDashboard(){
$all_teachers = Teacher::select('*')->get();
if(Session()->has('teacherStatus')){ if(Session()->has('teacherStatus')){
if(Session()->get('teacherStatus')["role"] == 'admin' || Session()->get('teacherStatus')["role"] == 'Admin'){ if(Session()->get('teacherStatus')["role"] == 'admin' || Session()->get('teacherStatus')["role"] == 'Admin'){
return view('dashboard'); return view('dashboard')->with(['all_teachers'=>$all_teachers]);
}else{ }else{
return redirect('/add_subject'); return redirect('/add_subject');
} }
...@@ -33,21 +35,27 @@ class TeacherController extends Controller ...@@ -33,21 +35,27 @@ class TeacherController extends Controller
return redirect('/admin_board'); return redirect('/admin_board');
} }
else { else {
if ($teacherDetails->username != null && $teacherDetails->email != null && $teacherDetails->pswd && $teacherDetails->teacherRole) { if ($teacherDetails->username != null && $teacherDetails->email != null && $teacherDetails->pswd && $teacherDetails->teacherRole && $teacherDetails->con_pswd != null) {
$teacher_table->username = $teacherDetails->username; if ($teacherDetails->pswd == $teacherDetails->con_pswd) {
$teacher_table->email = $teacherDetails->email; $teacher_table->username = $teacherDetails->username;
$teacher_table->email = $teacherDetails->email;
$teacher_table->password = Hash::make($teacherDetails->pswd);
$teacher_table->role = $teacherDetails->teacherRole; $teacher_table->password = Hash::make($teacherDetails->pswd);
$teacher_table->role = $teacherDetails->teacherRole;
$teacher_table->save();
Session()->flash('teacher', 'Teacher Registration Successfull. Please Login'); $teacher_table->save();
Session()->flash('teacher', 'Teacher Registration Successfull. Please Login');
return redirect('/admin_board');
} else {
Session()->flash('teacher', 'Password Not Match.');
return view('dashboard'); return redirect('/admin_board');
}
} else { } else {
Session()->flash('teacher', 'Please Fill All Feilds'); Session()->flash('teacher', 'Please Fill All Feilds');
return view('dashboard'); return redirect('/admin_board');
} }
} }
} }
...@@ -82,13 +90,15 @@ class TeacherController extends Controller ...@@ -82,13 +90,15 @@ class TeacherController extends Controller
Teacher::where('id', $updatedDetails->teacherId)->update([ Teacher::where('id', $updatedDetails->teacherId)->update([
'username'=>$updatedDetails->username, 'username'=>$updatedDetails->username,
'email'=>$updatedDetails->email, 'email'=>$updatedDetails->email,
'password'=>Hash::make($updatedDetails->pswd) 'password'=>Hash::make($updatedDetails->pswd),
'role'=>$updatedDetails->teacherRole
]); ]);
} else { } else {
Teacher::where('id', $updatedDetails->teacherId)->update([ Teacher::where('id', $updatedDetails->teacherId)->update([
'username'=>$updatedDetails->username, 'username'=>$updatedDetails->username,
'email'=>$updatedDetails->email, 'email'=>$updatedDetails->email,
'password'=>$updatedDetails->curPassword 'password'=>$updatedDetails->curPassword,
'role'=>$updatedDetails->teacherRole
]); ]);
} }
......
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class VideoModel extends Model
{
//
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDocumentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('documents', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('document_title');
$table->string('class_id');
$table->string('lesson_id');
$table->string('document_name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('documents');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateVideoModelsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('video_models', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('userId');
$table->string('lessonId');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('video_models');
}
}
<div class="p-4"> <div class="p-4">
<h1><a href="index.html" class="logo">Eduvance</a></h1> <h1>
<a href="/main" class="logo">
<div class="row">
<div class="col-12">
<p>Eduvance</p>
</div>
<div class="col-12">
<p class="text-center">VMS</p>
</div>
</div>
</a>
</h1>
<ul class="list-unstyled components mb-5"> <ul class="list-unstyled components mb-5">
<li> <li>
<a href="/"><span class="fa fa-home mr-3"></span> Home Page</a> <a href="/main"><span class="fa fa-home mr-3"></span> Home Page</a>
</li> </li>
@if(Session()->get('teacherStatus')['role'] == 'admin') @if(Session()->get('teacherStatus')['role'] == 'admin' || Session()->get('teacherStatus')['role'] == 'Admin')
<li class="active"> <li class="{{ (request()->is('admin_board')) ? 'active' : '' }}">
<a href="/admin_board"><span class="fa fa-user mr-3"></span> Registration</a> <a href="/admin_board"><span class="fa fa-user mr-3"></span> Registration</a>
</li> </li>
@endif @endif
<li> <li class="{{ (request()->is('add_subject')) ? 'active' : '' }}">
<a href="/add_subject"><span class="fa fa-book mr-3"></span> Subjects</a> <a href="/add_subject"><span class="fa fa-book mr-3"></span> Subjects</a>
</li> </li>
<li> <li class="{{ (request()->is('add_lesson')) ? 'active' : '' }}">
<a href="/add_lesson"><span class="fa fa-book mr-3"></span> Lessons</a> <a href="/add_lesson"><span class="fa fa-book mr-3"></span> Lessons</a>
</li> </li>
@if(Session()->get('teacherStatus')['role'] == 'admin') @if(Session()->get('teacherStatus')['role'] == 'admin' || Session()->get('teacherStatus')['role'] == 'Admin')
<li> <li class="{{ (request()->is('add-contact')) ? 'active' : '' }}">
<a href="/add-contact"><span class="fa fa-phone-square mr-3"></span> Contact Details</a> <a href="/add-contact"><span class="fa fa-phone-square mr-3"></span> Contact Details</a>
</li> </li>
@endif @endif
<li class="{{ (request()->is('add-documents')) ? 'active' : '' }}">
<a href="/add-documents"><span class="fa fa-book mr-3"></span> Documents</a>
</li>
<li> <li>
<a href="/logout"><span class="fa fa-sign-out mr-3"></span> Sign Out</a> <a href="/logout"><span class="fa fa-sign-out mr-3"></span> Sign Out</a>
</li> </li>
......
<!doctype html>
<html lang="en">
<head>
<title>All Classes</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="{{asset('admin/css/style.css')}}">
</head>
<style>
::placeholder{
color: black !important;
}
input[type="text"]{
border: 1px solid black;
}
input[type="email"]{
border: 1px solid black;
}
input[type="password"]{
border: 1px solid black;
}
.fl-l{
float: left !important;
color: black;
}
</style>
<body>
<div class="wrapper d-flex align-items-stretch">
<nav id="sidebar" class="active">
<div class="custom-menu">
<button type="button" id="sidebarCollapse" class="btn btn-primary">
<i class="fa fa-bars"></i>
<span class="sr-only">Toggle Menu</span>
</button>
</div>
{{View::make('admin_header')}}
<!-- Page Content -->
<div id="content" class="p-4 p-md-5 pt-5">
<h2 class="mb-4">All Classes</h2>
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<table class="table">
<tr>
<th>#</th>
<th>Class Name</th>
<th>Assigned Teacher</th>
<th>Actions</th>
</tr>
@foreach($classes as $class)
<tr>
<td>{{ $class['id'] }}</td>
<td>{{ $class['name'] }}</td>
<td>{{ $class['username'] }}</td>
<td>
<a href="/show-update-class/{{ $class['id'] }}" class="btn btn-primary btn-sm">Update</a>
{{-- <!-- <a href="/delete_subject/{{$subject['id']}}" class="btn btn-danger btn-sm">Delete</a> --> --}}
<a href = "/delete-class/{{ $class['id'] }}" class="btn btn-sm btn-danger">Delete</a>
</td>
</tr>
@endforeach
</table>
<a href="/admin_board"> <- Back to Registration Tab</a>
</div>
</div>
</div>
</div>
</div>
<script src="{{asset('admin/js/jquery.min.js')}}"></script>
<script src="{{asset('admin/js/popper.js')}}"></script>
<script src="{{asset('admin/js/bootstrap.min.js')}}"></script>
<script src="{{asset('admin/js/main.js')}}"></script>
</body>
</html>
\ No newline at end of file
...@@ -190,40 +190,39 @@ ...@@ -190,40 +190,39 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-3"> <div class="col-lg-3">
<p class="mb-4"><img src="images/logo.png" alt="Image" class="img-fluid"></p> <p class="mb-4"><img src="images/profile.jpeg" alt="Image" class="img-fluid"></p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p> <!-- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p>
<p><a href="#">Learn More</a></p> <p><a href="#">Learn More</a></p> -->
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Campus</span></h3> <h3 class="footer-heading"><span>Our School</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Acedemic</a></li> <li><a href="#">Story</a></li>
<li><a href="#">News</a></li> <li><a href="#">Vision</a></li>
<li><a href="#">Our Interns</a></li> <li><a href="#">Mission</a></li>
<li><a href="#">Our Leadership</a></li> <li><a href="#">News</a></li>
<li><a href="#">Careers</a></li> <li><a href="#">Gallery</a></li>
<li><a href="#">Human Resources</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Courses</span></h3> <h3 class="footer-heading"><span>Our Courses</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Math</a></li> <li><a href="#">Classes</a></li>
<li><a href="#">Science &amp; Engineering</a></li> <!-- <li><a href="#">Science &amp; Engineering</a></li>
<li><a href="#">Arts &amp; Humanities</a></li> <li><a href="#">Arts &amp; Humanities</a></li>
<li><a href="#">Economics &amp; Finance</a></li> <li><a href="#">Economics &amp; Finance</a></li>
<li><a href="#">Business Administration</a></li> <li><a href="#">Business Administration</a></li> -->
<li><a href="#">Computer Science</a></li> <li><a href="#">Lessons</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Contact</span></h3> <h3 class="footer-heading"><span>Contact Us</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Help Center</a></li> <li><a href="#">Contact Us</a></li>
<li><a href="#">Support Community</a></li> <li><a href="#">Email</a></li>
<li><a href="#">Press</a></li> <li><a href="#">Facebook</a></li>
<li><a href="#">Share Your Story</a></li> <li><a href="#">Youtube</a></li>
<li><a href="#">Our Supporters</a></li>
</ul> </ul>
</div> </div>
</div> </div>
......
This diff is collapsed.
<head>
<title>Eduvance &mdash; Video Management System</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Muli:300,400,700,900" rel="stylesheet">
<link rel="stylesheet" href="{{ asset('fonts/icomoon/style.css') }}">
<link rel="stylesheet" href="{{ asset('css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ asset('css/jquery-ui.css') }}">
<link rel="stylesheet" href="{{ asset('css/owl.carousel.min.css') }}">
<link rel="stylesheet" href="css/owl.theme.default.min.css">
<link rel="stylesheet" href="css/owl.theme.default.min.css">
<link rel="stylesheet" href="{{ asset('css/jquery.fancybox.min.css') }}">
<link rel="stylesheet" href="{{ asset('css/bootstrap-datepicker.css') }}">
<link rel="stylesheet" href="{{ asset('fonts/flaticon/font/flaticon.css') }}">
<link rel="stylesheet" href="{{ asset('css/aos.css') }}">
<link href="css/jquery.mb.YTPlayer.min.css" media="all" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="{{ asset('css/style.css') }}">
<link rel="stylesheet" href="{{asset('lesson_card/lesson_card.css')}}">
</head>
<div class="site-mobile-menu site-navbar-target"> <div class="site-mobile-menu site-navbar-target">
<div class="site-mobile-menu-header"> <div class="site-mobile-menu-header">
<div class="site-mobile-menu-close mt-3"> <div class="site-mobile-menu-close mt-3">
...@@ -12,9 +40,7 @@ ...@@ -12,9 +40,7 @@
<div class="container"> <div class="container">
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-lg-9 d-none d-lg-block"> <div class="col-lg-9 d-none d-lg-block">
<a href="#" class="small mr-3"><span class="icon-question-circle-o mr-2"></span> Have a questions?</a> <a href="/" class="btn btn-primary btn-lg" style="background-color: dodgerblue">Main System</a>
<a href="#" class="small mr-3"><span class="icon-phone2 mr-2"></span> 10 20 123 456</a>
<a href="#" class="small mr-3"><span class="icon-envelope-o mr-2"></span> info@mydomain.com</a>
</div> </div>
<div class="col-lg-3 text-right"> <div class="col-lg-3 text-right">
@if(Session()->has('member')) @if(Session()->has('member'))
...@@ -49,9 +75,17 @@ ...@@ -49,9 +75,17 @@
<div class="container"> <div class="container">
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<div class="site-logo"> <div class="site-logo">
<a href="/" class="d-block"> <a href="/main" class="d-block">
<!-- <img src="images/logo.png" alt="Image" class="img-fluid"> --> <div class="row">
<p>Eduvance - Video Management System</p> <div class="col">
<img src="{{ asset('images/logo_new.png') }}" style="width: 150px; height: 140px;" alt="Image" class="img-fluid">
</div>
<div class="row" style="margin-top: 55px">
<div class="col">
<p>Video Management System</p>
</div>
</div>
</div>
</a> </a>
</div> </div>
<div class="ml-auto"> <div class="ml-auto">
...@@ -69,7 +103,9 @@ ...@@ -69,7 +103,9 @@
</ul> </ul>
</li> --> </li> -->
<li> <li>
<a href="/admin_board" class="nav-link text-left">Dashboard</a> @if (Session()->get('teacherStatus'))
<a href="/admin_board" class="nav-link text-left">Dashboard</a>
@endif
<a href="/lessons" class="nav-link text-left">Lessons</a> <a href="/lessons" class="nav-link text-left">Lessons</a>
</li> </li>
<li> <li>
...@@ -81,9 +117,9 @@ ...@@ -81,9 +117,9 @@
</div> </div>
<div class="ml-auto"> <div class="ml-auto">
<div class="social-wrap"> <div class="social-wrap">
<a href="#"><span class="icon-facebook"></span></a> <a href="https://www.facebook.com/profile.php?id=100086794281981"><span class="icon-facebook"></span></a>
<a href="#"><span class="icon-twitter"></span></a> <a href="https://www.youtube.com/channel/UCxfkDZSDPo7UdeGHXMFNyLw"><span class="icon-youtube"></span></a>
<a href="#"><span class="icon-linkedin"></span></a> <a href="mailto:eduvanceschoolms@gmail.com"><span class="icon-google"></span></a>
<a href="#" class="d-inline-block d-lg-none site-menu-toggle js-menu-toggle text-black"><span <a href="#" class="d-inline-block d-lg-none site-menu-toggle js-menu-toggle text-black"><span
class="icon-menu h3"></span></a> class="icon-menu h3"></span></a>
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<div class="container"> <div class="container">
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-lg-12 mx-auto text-center" data-aos="fade-up"> <div class="col-lg-12 mx-auto text-center" data-aos="fade-up">
<h1>- Eduvance -</h1> <h1>- EDUVANCE -</h1>
<h1>Video Management System</h1> <h1>Video Management System</h1>
</div> </div>
</div> </div>
...@@ -510,41 +510,41 @@ ...@@ -510,41 +510,41 @@
<div class="footer"> <div class="footer">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<!-- <div class="col-lg-3"> <div class="col-lg-3">
<p class="mb-4"><img src="images/logo.png" alt="Image" class="img-fluid"></p> <p class="mb-4"><img src="images/profile.jpeg" alt="Image" class="img-fluid"></p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p> <!-- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p>
<p><a href="#">Learn More</a></p> <p><a href="#">Learn More</a></p> -->
</div> --> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our School</span></h3> <h3 class="footer-heading"><span>Our School</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Academic</a></li> <li><a href="#">Story</a></li>
<li><a href="#">Vision</a></li>
<li><a href="#">Mission</a></li>
<li><a href="#">News</a></li> <li><a href="#">News</a></li>
<li><a href="#">Our Interns</a></li> <li><a href="#">Gallery</a></li>
<li><a href="#">Our Leadership</a></li>
<li><a href="#">Careers</a></li>
<li><a href="#">Human Resources</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Courses</span></h3> <h3 class="footer-heading"><span>Our Courses</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Math</a></li> <li><a href="#">Classes</a></li>
<li><a href="#">Science &amp; Engineering</a></li> <!-- <li><a href="#">Science &amp; Engineering</a></li>
<li><a href="#">Arts &amp; Humanities</a></li> <li><a href="#">Arts &amp; Humanities</a></li>
<li><a href="#">Economics &amp; Finance</a></li> <li><a href="#">Economics &amp; Finance</a></li>
<li><a href="#">Business Administration</a></li> <li><a href="#">Business Administration</a></li> -->
<li><a href="#">Computer Science</a></li> <li><a href="#">Lessons</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Contact Us</span></h3> <h3 class="footer-heading"><span>Contact Us</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Help Center</a></li> <li><a href="#">Contact Us</a></li>
<li><a href="#">Support Community</a></li> <li><a href="#">Email</a></li>
<li><a href="#">Press</a></li> <li><a href="#">Facebook</a></li>
<li><a href="#">Share Your Story</a></li> <li><a href="#">Youtube</a></li>
<li><a href="#">Our Supporters</a></li>
</ul> </ul>
</div> </div>
</div> </div>
......
This diff is collapsed.
This diff is collapsed.
...@@ -173,41 +173,40 @@ ...@@ -173,41 +173,40 @@
<div class="footer"> <div class="footer">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<!-- <div class="col-lg-3"> <div class="col-lg-3">
<p class="mb-4"><img src="images/logo.png" alt="Image" class="img-fluid"></p> <p class="mb-4"><img src="images/profile.jpeg" alt="Image" class="img-fluid"></p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p> <!-- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p>
<p><a href="#">Learn More</a></p> <p><a href="#">Learn More</a></p> -->
</div> --> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Campus</span></h3> <h3 class="footer-heading"><span>Our School</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Acedemic</a></li> <li><a href="#">Story</a></li>
<li><a href="#">Vision</a></li>
<li><a href="#">Mission</a></li>
<li><a href="#">News</a></li> <li><a href="#">News</a></li>
<li><a href="#">Our Interns</a></li> <li><a href="#">Gallery</a></li>
<li><a href="#">Our Leadership</a></li>
<li><a href="#">Careers</a></li>
<li><a href="#">Human Resources</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Courses</span></h3> <h3 class="footer-heading"><span>Our Courses</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Math</a></li> <li><a href="#">Classes</a></li>
<li><a href="#">Science &amp; Engineering</a></li> <!-- <li><a href="#">Science &amp; Engineering</a></li>
<li><a href="#">Arts &amp; Humanities</a></li> <li><a href="#">Arts &amp; Humanities</a></li>
<li><a href="#">Economics &amp; Finance</a></li> <li><a href="#">Economics &amp; Finance</a></li>
<li><a href="#">Business Administration</a></li> <li><a href="#">Business Administration</a></li> -->
<li><a href="#">Computer Science</a></li> <li><a href="#">Lessons</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Contact</span></h3> <h3 class="footer-heading"><span>Contact Us</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Help Center</a></li> <li><a href="#">Contact Us</a></li>
<li><a href="#">Support Community</a></li> <li><a href="#">Email</a></li>
<li><a href="#">Press</a></li> <li><a href="#">Facebook</a></li>
<li><a href="#">Share Your Story</a></li> <li><a href="#">Youtube</a></li>
<li><a href="#">Our Supporters</a></li>
</ul> </ul>
</div> </div>
</div> </div>
......
...@@ -96,41 +96,41 @@ ...@@ -96,41 +96,41 @@
<div class="footer"> <div class="footer">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<!-- <div class="col-lg-3"> <div class="col-lg-3">
<p class="mb-4"><img src="images/logo.png" alt="Image" class="img-fluid"></p> <p class="mb-4"><img src="images/profile.jpeg" alt="Image" class="img-fluid"></p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p> <!-- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p>
<p><a href="#">Learn More</a></p> <p><a href="#">Learn More</a></p> -->
</div> --> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Campus</span></h3> <h3 class="footer-heading"><span>Our School</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Acedemic</a></li> <li><a href="#">Story</a></li>
<li><a href="#">Vision</a></li>
<li><a href="#">Mission</a></li>
<li><a href="#">News</a></li> <li><a href="#">News</a></li>
<li><a href="#">Our Interns</a></li> <li><a href="#">Gallery</a></li>
<li><a href="#">Our Leadership</a></li>
<li><a href="#">Careers</a></li>
<li><a href="#">Human Resources</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Courses</span></h3> <h3 class="footer-heading"><span>Our Courses</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Math</a></li> <li><a href="#">Classes</a></li>
<li><a href="#">Science &amp; Engineering</a></li> <!-- <li><a href="#">Sc &amp; Engineering</a></li>
<li><a href="#">Arts &amp; Humanities</a></li> <li><a href="#">Arts &amp; Humanities</a></li>
<li><a href="#">Economics &amp; Finance</a></li> <li><a href="#">Economics &amp; Finance</a></li>
<li><a href="#">Business Administration</a></li> <li><a href="#">Business Administration</a></li> -->
<li><a href="#">Computer Science</a></li> <li><a href="#">Lessons</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Contact</span></h3> <h3 class="footer-heading"><span>Contact</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Help Center</a></li> <li><a href="#">Contact Us</a></li>
<li><a href="#">Support Community</a></li> <li><a href="#">Email</a></li>
<li><a href="#">Press</a></li> <li><a href="#">Facebook</a></li>
<li><a href="#">Share Your Story</a></li> <li><a href="#">Youtube</a></li>
<li><a href="#">Our Supporters</a></li>
</ul> </ul>
</div> </div>
</div> </div>
......
...@@ -8,27 +8,23 @@ ...@@ -8,27 +8,23 @@
<title>Main Page</title> <title>Main Page</title>
</head> </head>
<body> <body>
<body style="background-color:#87CEFA;"> <body style="background-repeat: no-repeat; background-size: cover; background-image: url({{asset('images/background.png')}});">
<div class="container"> <div class="container">
<div class="row mt-5"> <div class="row mt-5">
<span class="text-center mt-2 mb-5"> <div class="col-2">
<h1>Eduvance - School Learning Management System</h1> <img src="{{ asset('images/logo_new.png') }}" style="width: 300px; height: 110px;" alt="Image" class="img-fluid">
</span>
<div class="col-3">
<div class="card" style="height: 20rem;">
<div class="card-body">
<h2 class="text-center">AI ChatBot</h1>
<div class="text-center">
<a href="" class="btn btn-primary mt-5">View System</a>
</div>
</div>
</div>
</div> </div>
<div class="col">
<span class="text-center mt-2 mb-5">
<h1 style="color: black; font-size: 50px; font-weight: bolder;">EDUVANCE - School Learning Management System</h1>
</span>
</div>
<div class="row mt-5">
<div class="col-3"> <div class="col-3">
<div class="card" style="height: 20rem;"> <div class="card" style="height: 18rem;width: 22rem;">
<div class="card-body"> <div class="card-body">
<h2 class="text-center">Course Recommendation</h1> <h2 class="text-center" style="font-weight: bolder;">Course Recommendation</h1>
<div class="text-center"> <div class="text-center">
<a href="" class="btn btn-primary mt-5">View System</a> <a href="" class="btn btn-primary mt-5">View System</a>
</div> </div>
...@@ -36,27 +32,20 @@ ...@@ -36,27 +32,20 @@
</div> </div>
</div> </div>
<div class="col-3"> <div class="col-3" style="margin-left: 40px;">
<div class="card" style="height: 20rem;"> <div class="card" style="height: 18rem;width: 22rem;">
<div class="card-body"> <div class="card-body">
<h2 class="text-center">Video Management System</h1> <h2 class="text-center" style="font-weight: bolder;">Video Management System</h1>
<div class="text-center"> <div class="text-center">
<a href="/main" class="btn btn-primary mt-5">View System</a> <a href="/main" class="btn btn-primary mt-5">View System</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-3">
<div class="card" style="height: 20rem;">
<div class="card-body">
<h2 class="text-center">Teacher Performance Handler</h1>
<div class="text-center">
<a href="" class="btn btn-primary mt-5">View System</a>
</div>
</div>
</div>
</div> </div>
</div> </div>
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</p> --> </p> -->
<div class="mb-3"> <div class="mb-3">
<label for="teacherId" class="fl-l">Teacher Name -</label> <label for="teacherId" class="fl-l">Select Teacher Name -</label>
<select name="teacherId" id="" class="form-control" style="border: 1px solid black;"> <select name="teacherId" id="" class="form-control" style="border: 1px solid black;">
<!-- @foreach($teachers as $each_teacher) <!-- @foreach($teachers as $each_teacher)
<option value="{{ $each_teacher['id'] }}">{{ $each_teacher['username'] }}</option> <option value="{{ $each_teacher['id'] }}">{{ $each_teacher['username'] }}</option>
......
<!doctype html>
<html lang="en">
<head>
<title>All Subjects</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="{{asset('admin/css/style.css')}}">
</head>
<style>
::placeholder {
color: black !important;
}
input[type="text"] {
border: 1px solid black;
}
input[type="email"] {
border: 1px solid black;
}
input[type="password"] {
border: 1px solid black;
}
.fl-l {
float: left !important;
color: black;
}
.select {
border: 1px solid black;
}
</style>
<body>
<div class="wrapper d-flex align-items-stretch">
<nav id="sidebar" class="active">
<div class="custom-menu">
<button type="button" id="sidebarCollapse" class="btn btn-primary">
<i class="fa fa-bars"></i>
<span class="sr-only">Toggle Menu</span>
</button>
</div>
{{View::make('admin_header')}}
<!-- Page Content -->
<div id="content" class="p-4 p-md-5 pt-5">
<h2 class="mb-4">Update Class Details</h2>
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<form class="text-center border border-light p-5" action="/update_class" method="post">
@csrf
@if(Session()->get('status') != '')
<div class="col-md-12 alert alert-success" role="alert">
{{Session()->get('status')}}
</div>
@endif
<p class="h4 mb-4">Update Class Details</p>
<!-- <p>Join our mailing list. We write rarely, but only the best content.</p> -->
<!-- <p>
<a href="" target="_blank">See the last newsletter</a>
</p> -->
<!-- Name -->
<div class="mb-3">
<input type="hidden" value="{{ $selected_classDetails[0]['id'] }}" name="classId">
<input type="text" placeholder="Class Name" name="className" class="form-control" value="{{ $selected_classDetails[0]['name'] }}">
</div>
<div class="mb-3">
<select name="teacherId" id="" class="form-control select">
@foreach ($all_teachers as $teacher)
@if($selected_classDetails[0]['username'] == $teacher['username'])
<option value="{{ $teacher['id'] }}" selected>{{ $teacher['username'] }}</option>
@else
<option value="{{ $teacher['id'] }}">{{ $teacher['username'] }}</option>
@endif
@endforeach
</select>
</div>
<!-- Sign in button -->
<button class="btn btn-info btn-block" type="submit">Update Class Details</button>
</form>
<a href="/add_subject">
<- Back to Subjects Tab</a>
</div>
</div>
</div>
</div>
</div>
<script src="{{asset('admin/js/jquery.min.js')}}"></script>
<script src="{{asset('admin/js/popper.js')}}"></script>
<script src="{{asset('admin/js/bootstrap.min.js')}}"></script>
<script src="{{asset('admin/js/main.js')}}"></script>
</body>
</html>
\ No newline at end of file
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<title>Sidebar 03</title> <title>Update Lesson</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
...@@ -67,11 +67,11 @@ ...@@ -67,11 +67,11 @@
@endif @endif
<p class="h4 mb-4">Update Lesson</p> <p class="h4 mb-4">Update Lesson</p>
<p>Join our mailing list. We write rarely, but only the best content.</p> <!-- <p>Join our mailing list. We write rarely, but only the best content.</p> -->
<p> <!-- <p>
<a href="" target="_blank">See the last newsletter</a> <a href="" target="_blank">See the last newsletter</a>
</p> </p> -->
<div class="mb-3"> <div class="mb-3">
<label for="classGrade" style="float: left; color: black;">Select Grade</label> <label for="classGrade" style="float: left; color: black;">Select Grade</label>
...@@ -99,12 +99,13 @@ ...@@ -99,12 +99,13 @@
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="" style="float: left; color: black;">Choose Thumbnail For Vedio</label> <label for="" style="float: left; color: black;">Choose Thumbnail for Video</label>
<input type="hidden" name="currentImage" value="{{$selected_lesson[0]['lesson_thumbnail']}}"> <input type="hidden" name="currentImage" value="{{$selected_lesson[0]['lesson_thumbnail']}}">
<input type="file" class="form-control" name="lessonThumbnail"> <input type="file" class="form-control" name="lessonThumbnail">
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="" style="float: left; color: black;">Choose Video to Upload</label>
<input type="hidden" name="lesson_id" value="{{$selected_lesson[0]['id']}}"> <input type="hidden" name="lesson_id" value="{{$selected_lesson[0]['id']}}">
<input type="hidden" name="checkStatusV" value="{{$selected_lesson[0]['lesson_vedio_link']}}"> <input type="hidden" name="checkStatusV" value="{{$selected_lesson[0]['lesson_vedio_link']}}">
<input type="hidden" name="checkStatusL" value="{{$selected_lesson[0]['platform_link']}}"> <input type="hidden" name="checkStatusL" value="{{$selected_lesson[0]['platform_link']}}">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<title>Sidebar 03</title> <title>Update Student</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<button class="btn btn-info btn-block" type="submit">Update Student</button> <button class="btn btn-info btn-block" type="submit">Update Student</button>
</form> </form>
<!-- Default form subscription --> <!-- Default form subscription -->
<a href="/show-all-students">Show All Registred Students -></a> <a href="/show-all-students"> <- Back to All Students Tab</a>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
@endif @endif
<p class="h4 mb-4">Update Subject Details</p> <p class="h4 mb-4">Update Subject Details</p>
<p>Join our mailing list. We write rarely, but only the best content.</p> <!-- <p>Join our mailing list. We write rarely, but only the best content.</p>
<p> <p>
<a href="" target="_blank">See the last newsletter</a> <a href="" target="_blank">See the last newsletter</a> -->
</p> </p>
<div class="mb-3"> <div class="mb-3">
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
</form> </form>
<!-- Default form subscription --> <!-- Default form subscription -->
<a href="/show_all_subjects">Back to The All Subjects -></a> <a href="/show_all_subjects"> <- Back to All Subjects Tab </a>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<button class="btn btn-info btn-block" type="submit">Update Teacher</button> <button class="btn btn-info btn-block" type="submit">Update Teacher</button>
</form> </form>
<!-- Default form subscription --> <!-- Default form subscription -->
<a href="/show-all-teachers">Back to The Registred Teachers -></a> <a href="/show-all-teachers"> <- Back to All Teachers Tab</a>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -97,7 +97,7 @@ Route::get('/update_lesson/{id}', function ($id) { ...@@ -97,7 +97,7 @@ Route::get('/update_lesson/{id}', function ($id) {
//dd($data); //dd($data);
$selectedLesson = json_decode(json_encode($data), true); $selectedLesson = json_decode(json_encode($data), true);
//dd($selectedLesson);
return view('update_lesson')->with(['selected_lesson'=>$selectedLesson, 'all_classes'=>$all_classes]); return view('update_lesson')->with(['selected_lesson'=>$selectedLesson, 'all_classes'=>$all_classes]);
}); });
...@@ -181,4 +181,28 @@ Route::post('/save_contact', 'ContactDetailController@saveContactDetails'); ...@@ -181,4 +181,28 @@ Route::post('/save_contact', 'ContactDetailController@saveContactDetails');
Route::post('/save_feedback', 'ContactDetailController@saveUserFeedbackDetail'); Route::post('/save_feedback', 'ContactDetailController@saveUserFeedbackDetail');
Route::get('/delete_feedback/{id}', 'ContactDetailController@deleteStudentFeedback'); Route::get('/delete_feedback/{id}', 'ContactDetailController@deleteStudentFeedback');
\ No newline at end of file
Route::get('/add-documents', 'DocumentController@showAddDocumentPage');
Route::post('/add_class', 'ClassesController@createNewClass');
Route::get('/all_classes', 'ClassesController@getAllClasses');
Route::get('/show-update-class/{id}', 'ClassesController@showUpdateClassForm');
Route::post('/update_class', 'ClassesController@updateSelectedClassDetails');
Route::get('/delete-class/{id}', 'ClassesController@deleteSelectedClassDetails');
Route::get('/findSubjectsForDocumentAdd','DocumentController@findSubjectsForDocumentAdd');
Route::get('/findLessonsForDocumentAdd', 'DocumentController@findLessonsForDocumentAdd');
Route::post('/upload-documents', 'DocumentController@uploadSelectedDocuments');
Route::get('/delete-document/{id}', 'DocumentController@deleteSelectedDocument');
Route::get('/test/{id}', 'LessonController@calculateLessonVideoViewCount')->name('test');
Route::get('/getViewCount/{id}', 'LessonController@getLessonVideoViewCount');
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment