Jelajahi Sumber

Profile modified

Shah Rakibur Rahaman 1 tahun lalu
induk
melakukan
78b555bd41

+ 1 - 1
app/Http/Controllers/StudentHomeController.php

@@ -40,7 +40,7 @@ class StudentHomeController extends Controller
     { 
         $user = Auth::user();
         $institution= Institution::where('student_id',Auth::user()->id)->get();
-        $work_experience= Workexperience::where('student_id',Auth::user()->id)->get();
+        $work_experience= Workexperience::where('student_id',Auth::user()->id)->get(); 
         $score= Score::where('student_id',$user->id)->get(); 
         $proposal= Proposal::where('student_id',$user->id)->orderBy('id','DESC')->get();
         $user_info= User::find($user->id);

+ 26 - 23
resources/views/profile.blade.php

@@ -125,11 +125,7 @@
                                                                                 <span>.</span>  
                                                                                 <span style="font-size:10px;">{{$row->status}}</span> 
                                                                             </div>                                             
-                                                                        </div>
-                                                                        <!-- <div class="pro_type mt-2 pt-1" style="width: 19%;">                                                                          
-                                                                            <strong style="font-size:13px;">{{$row->file_type}}</strong> 
-                                                                            <i class="fa fa-file-pdf-o" style="font-size: 13px !important; padding: 4px;"></i>                                                                        
-                                                                        </div> -->
+                                                                        </div> 
                                                                         <div class="pro_title" style="width: 26%; text-align: center; margin-top: -3px;">
                                                                             <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>                                             
@@ -429,7 +425,9 @@
                                                                     <th>Subject</th>
                                                                     <th>Result</th>
                                                                     <th>During</th>
+                                                                    @if(profile_permission($institution[0]->student_id))
                                                                     <th>Action</th>
+                                                                    @endif
                                                                 </tr>
                                                             </thead>
                                                             <tbody>
@@ -447,17 +445,19 @@
                                                                             </div>
                                                                         </td>
                                                                         <td style="font-size: 11px;">{{date("d M, Y", strtotime($row->start_date)).' - '.date("d M, Y", strtotime($row->end_date))}}</td>
-                                                                          <td class="text-center" style="width: 75px;">
+                                                                        @if(profile_permission($row->student_id))
+                                                                        <td class="text-center" style="width: 75px;">
                                                                                 <div class="icon_bar" style="border: none;"> 
-                                                                                    @if(profile_permission($row->student_id))                                                                                             
+                                                                                                                                                                                
                                                                                     <a role="" data-bs-toggle="collapse" data-bs-parent="#collapse" href="#collapse1" aria-expanded="true" aria-controls="collapse1">
                                                                                         <i class="fa fa-edit" data-toggle="collapse" data-target="#demo11" onclick="editInstitute({{$row}})"></i>
                                                                                     </a>
                                                                                     
                                                                                         <i class="fa fa-trash delete_education" data-id="{{ $row->id }}"></i>
-                                                                                    @endif                                                                                   
+                                                                                                                                                                     
                                                                                 </div>
-                                                                         </td>   
+                                                                         </td>  
+                                                                         @endif  
                                                                     </tr>
                                                                 @endforeach
                                                             </tbody>
@@ -814,7 +814,9 @@
                                                                         <th>Currently working</th>
                                                                         <th>Start Date</th>
                                                                         <th>End Date</th>
-                                                                        <th>Action</th>
+                                                                        @if(profile_permission($work_experience[0]->student_id)) 
+                                                                        <th>Action</th> 
+                                                                        @endif
                                                                     </tr>
                                                                 </thead>
                                                                 <tbody>
@@ -825,16 +827,17 @@
                                                                             <td style="font-size: 11px;">{{$row->currently_working == 0 ? 'off' : 'on'}}</td> 
                                                                             <td style="font-size: 11px;">{{date("d M, Y", strtotime($row->start_date))}}</td>
                                                                             <td style="font-size: 11px;">{{date("d M, Y", strtotime($row->end_date))}}</td>
+                                                                            @if(profile_permission($row->student_id))
                                                                             <td class="text-center" style="width: 75px;">
-                                                                                    <div class="icon_bar" style="border: none;">
-                                                                                    @if(profile_permission($row->student_id))   
-                                                                                    <a role="" data-bs-toggle="collapse" data-bs-parent="#collapse" href="#collapse1" aria-expanded="true" aria-controls="collapse1">
-                                                                                            <i class="fa fa-edit" data-toggle="collapse" data-target="#demo12" onclick="editWork({{$row}})"></i>
-                                                                                        </a>
-                                                                                        <i class="fa fa-trash delete_work" data-id="{{ $row->id }}"></i>
-                                                                                    @endif
-                                                                                    </div>
+                                                                                <div class="icon_bar" style="border: none;"> 
+                                                                                <a role="" data-bs-toggle="collapse" data-bs-parent="#collapse" href="#collapse1" aria-expanded="true" aria-controls="collapse1">
+                                                                                        <i class="fa fa-edit" data-toggle="collapse" data-target="#demo12" onclick="editWork({{$row}})"></i>
+                                                                                    </a>
+                                                                                    <i class="fa fa-trash delete_work" data-id="{{ $row->id }}"></i>
+                                                                            
+                                                                                </div>
                                                                             </td>   
+                                                                            @endif
                                                                         </tr> 
                                                                     @endforeach                                                              
                                                                 </tbody>
@@ -1145,16 +1148,16 @@
                                                                                 <strong style="color: rgb(57, 59, 62); font-size: 12px;">{{$row->reading}}</strong><br>
                                                                                 <strong style="font-size: 12px;">Reading</strong>
                                                                             </td>
-                                                                            <td class="text-center" style="width: 75px;">
-                                                                                @if(profile_permission($row->student_id))
+                                                                            @if(profile_permission($row->student_id))
+                                                                            <td class="text-center" style="width: 75px;"> 
                                                                                 <div class="icon_bar"> 
                                                                                         <a role="" data-bs-toggle="collapse" data-bs-parent="#collapse" href="#collapse1" aria-expanded="true" aria-controls="collapse1">
                                                                                             <i class="fa fa-edit" data-toggle="collapse" data-target="#demo13" onclick="editScore({{$row}})"></i>
                                                                                         </a>
                                                                                         <i class="fa fa-trash delete_score" data-id="{{ $row->id }}"></i> 
-                                                                                </div>
-                                                                                @endif
-                                                                            </td>                                                       
+                                                                                </div> 
+                                                                            </td>  
+                                                                            @endif                                                     
                                                                         </tr>
                                                                         @endforeach
                                                                     </tbody>

+ 1 - 1
resources/views/register-v2.blade.php

@@ -201,7 +201,7 @@
                         <div class="col-md-12 others_department" style="display:none;">
                             <div class="mb-3"> 
                                 <div class="form-icon position-relative">
-                                    <input type="text" class="form-control" name="others_department" placeholder="Others department name" required="" autocomplete="new-password">
+                                    <input type="text" class="form-control" name="others_department" placeholder="Others department name">
                                 </div>
                             </div>
                         </div>

+ 15 - 18
routes/web.php

@@ -13,18 +13,20 @@ use Illuminate\Support\Facades\Route;
 |
 */
 
+Route::get('/clear-all', function() {
+    Artisan::call('cache:clear');
+    Artisan::call('view:clear');
+    Artisan::call('clear-compiled');
+    Artisan::call('config:cache');
+    Artisan::call('config:clear');
+    return "All is cleared";
+});
+
 Route::get('/', function () {
     return view('welcome');
 });
 
-// Route::get('/login-v2', function () {
-//     return view('login-v2');
-// });
-
-// Route::get('/register-v2', function () {
-//     return view('register-v2');
-// });
-
+ 
 Route::get('/dashboard', function () {
     return view('dashboard');
 });
@@ -33,10 +35,7 @@ Route::get('/dashboard', function () {
      return view('register_teacher_email');
  });
 
-// Route::get('/profile', function () {
-//     return view('profile');
-// });
-
+ 
 Route::get('/explore', function () {
     return view('explore');
 });
@@ -50,14 +49,11 @@ Route::get('/title', function () {
 
 
 Auth::routes();
-//Route::get('/profile', 'HomeController@index')->name('profile');
+ 
 Route::get('/email-verification/{id}', [App\Http\Controllers\RegisterController::class,'email_verification'])->name('/email-verification');
-
-// Student
-// Route::get('/home', function () {
-//     return view('home');
-// });
+ 
 Route::group(['middleware' => ['auth']], function() {
+
 Route::get('/home', [App\Http\Controllers\StudentHomeController::class,'index']);
 Route::get('/application', [App\Http\Controllers\StudentHomeController::class,'application']);
 Route::get('/profile', [App\Http\Controllers\StudentHomeController::class,'profile'])->name('profile');
@@ -79,6 +75,7 @@ Route::post('/home/proposal-media-upload', [App\Http\Controllers\StudentHomeCont
 Route::get('/change_work_experience/{status}', [App\Http\Controllers\StudentHomeController::class,'change_work_experience'])->name('change_work_experience');
 Route::get('/change_test_score/{status}', [App\Http\Controllers\StudentHomeController::class,'change_test_score'])->name('change_test_score');
 Route::get('/home/search', [App\Http\Controllers\StudentHomeController::class,'ref_search'])->name('ref-search');
+
 });