|
@@ -39,9 +39,14 @@ class TeacherHomeController extends Controller
|
|
|
return view('teacher_profile',compact('students','user','departments','refer_users','universities'));
|
|
|
}
|
|
|
|
|
|
- public function student_proposal_details($id){
|
|
|
+ public function student_proposal_details($hash){
|
|
|
+
|
|
|
$user = Auth::guard('teacher')->user();
|
|
|
- $proposal_details = StudentProposal::find($id);
|
|
|
+ $hashids=new \Hashids\Hashids('application', 25);
|
|
|
+ $hash_ids=$hashids->decode($hash);
|
|
|
+ if(empty($hash_ids[0])) abort(404);
|
|
|
+
|
|
|
+ $proposal_details = StudentProposal::find($hash_ids[0]);
|
|
|
$education_history =Institution::where(
|
|
|
'student_id',$proposal_details->student_id
|
|
|
)->orderBy('id','desc')->get();
|
|
@@ -65,7 +70,7 @@ class TeacherHomeController extends Controller
|
|
|
'std_proposal_id',$proposal_details->id
|
|
|
)->get();
|
|
|
|
|
|
- return view('teacher.student_proposal_details',compact('proposal_details','education_history','start_date','end_date','doc_info'));
|
|
|
+ return view('teacher.student_proposal_details',compact('hash_ids','proposal_details','education_history','start_date','end_date','doc_info'));
|
|
|
}
|
|
|
|
|
|
|
|
@@ -91,14 +96,14 @@ class TeacherHomeController extends Controller
|
|
|
}
|
|
|
|
|
|
if($request->submitted_date){
|
|
|
- $date_array = explode("to",$request->submitted_date);
|
|
|
+ $date_array = explode("to",$request->submitted_date);
|
|
|
|
|
|
$from_date = date('d-m-Y', strtotime($date_array[0]));
|
|
|
- $to_date = date('d-m-Y', strtotime($date_array[1]));
|
|
|
+ $to_date = date('d-m-Y', strtotime($date_array[1]));
|
|
|
|
|
|
$start_date=$carbon->parse($from_date)->toDateString();
|
|
|
$end_date=$carbon->parse($to_date)->toDateString();
|
|
|
-
|
|
|
+
|
|
|
|
|
|
$students->whereRaw("DATE(submitted_date) >= ? AND DATE(submitted_date) <= ?", [$start_date, $end_date]);
|
|
|
}
|
|
@@ -108,7 +113,7 @@ class TeacherHomeController extends Controller
|
|
|
|
|
|
$from_month_year = date('m-Y', strtotime($date_array[0])); //01-06-2023
|
|
|
$to_month_year = date('m-Y', strtotime($date_array[1]));//31-07-2023
|
|
|
-
|
|
|
+
|
|
|
$start_date=$carbon->parse('01-'.$from_month_year)->toDateString();
|
|
|
$end_date=$carbon->parse('01-'.$to_month_year)->toDateString();
|
|
|
|