Browse Source

Teacher Profile

Shah Rakibur Rahaman 2 years ago
parent
commit
b18c071226

+ 4 - 0
app/StudentProposal.php

@@ -25,4 +25,8 @@ class StudentProposal extends Model
     {
         return $this->belongsTo(Workexperience::class, 'student_id','student_id');
     } 
+    public function proposal()
+    {
+        return $this->belongsTo(Proposal::class, 'student_id','student_id');
+    } 
 }

+ 2 - 2
resources/views/profile.blade.php

@@ -125,8 +125,8 @@
                                                                             <i class="fa fa-file-pdf-o" style="font-size: 13px !important; padding: 4px;"></i>                                                                        
                                                                         </div> -->
                                                                         <div class="pro_title" style="width: 26%; text-align: center; margin-top: -3px;">
-                                                                            <strong style="font-size:13px; font-weight:600 !important; ">8 Mar 2023</strong>
-                                                                            <span style="font-size:10px; display: block;">3 days ago</span>                                             
+                                                                            <strong style="font-size:13px; font-weight:600 !important; ">{{date('d M Y', strtotime($row->created_at))}}</strong>
+                                                                            <span style="font-size:10px; display: block;">{{$row->created_at->diffForHumans()}}</span>                                             
                                                                         </div>
                                                                         <div class="mt-2 pt-1" style="margin-right: 10px; width: 20%; text-align: end;">                                                                          
                                                                             <a role="" data-bs-toggle="collapse" data-bs-parent="#collapse" href="#collapse2" aria-expanded="true" aria-controls="collapse2">

+ 13 - 6
resources/views/teacher_profile.blade.php

@@ -546,20 +546,27 @@ tbody, td, tfoot, th, thead, tr {
                                             </td>
                                             <td style="font-size: 11px; text-align:center;">
                                                 <div style="font-size: 11px; display:block;">
-                                                    <span class="label_badge_work">3 years</span>
+                                                    @php
+                                                        $to = \Carbon\Carbon::parse($row->work_experience->end_date); 
+                                                        $from = \Carbon\Carbon::parse($row->work_experience->start_date); 
+                                                        $years = $to->diffInYears($from);
+                                                    @endphp
+                                                    <span class="label_badge_work">@if($years) {{$years}} years @endif</span>
                                                 </div>
                                                 <div style="font-size: 11px; font-weight: 600; display:block;">
-                                                    <span>Sep 2019 - continue</span>
+                                                    @if($to==null)
+                                                    <span>{{date('M Y', strtotime($row->work_experience->start_date))}} - continue</span>
+                                                    @endif
                                                 </div>
                                             </td>
                                             <td style="font-size: 11px;">
                                                 <div class="inner_right">
-                                                    <a href="{{ url('title') }}"><strong style="font-size:11px; color:#6e6b7b;">Title</strong></a></br>
-                                                    <span>Bangla</span>
+                                                    <a href="{{ url('title') }}"><strong style="font-size:11px; color:#6e6b7b;">{{cn($row,'proposal.title','')}}</strong></a></br>
+                                                    <span>{{cn($row,'proposal.methology','')}}</span>
                                                     <span>.</span>
-                                                    <span>Self-funded</span>
+                                                    <span>{{cn($row,'proposal.department','')}}</span>
                                                     <span>.</span>
-                                                    <span>Qualitative</span>
+                                                    <span>{{cn($row,'proposal.status','')}}</span>
                                                 </div>
                                             </td>
                                             <td style="font-size: 11px; text-align:center;">