@php $editRoute = 'instructor.edit'; $deleteRoute = 'instructor.destroy'; $restoreRoute = 'instructor.restore'; $verifyRoute = 'instructor.verify.email'; $statusChangeRoute = 'instructor.status'; $viewRoute = 'instructor.profile'; $translateRoute = 'instructor.translate'; if (isOrganization()) { $editRoute = 'organization.instructor.edit'; $deleteRoute = 'organization.instructor.destroy'; $restoreRoute = 'organization.instructor.restore'; $viewRoute = 'organization.instructor.profile'; $statusChangeRoute = 'organization.instructor.status'; $translateRoute = 'organization.instructor.translate'; } $isAdmin = isAdmin(); $title = translate('Do you want to move to Trash'); $text = translate('If You trash,Instructor and Instructor related all data will be trashed.'); @endphp
@if ($isAdmin) @endif @foreach ($instructors as $instructor) @php $userInfo = $instructor->userable ?? null; $userableTranslations = []; $designationTranslations = []; if ($userInfo) { $userableTranslations = parse_translation($userInfo); } if (method_exists($userInfo, 'designation')) { $designationTranslations = parse_translation($userInfo->designation); } $firstName = $userableTranslations['first_name'] ?? ($userInfo?->first_name ?? ''); $lastName = $userableTranslations['last_name'] ?? ($userInfo?->last_name ?? ''); $designation = $designationTranslations['title'] ?? $userInfo?->designation?->title; $profileImg = $userInfo && fileExists('lms/instructors', $userInfo->profile_img) == true ? asset("storage/lms/instructors/{$userInfo->profile_img}") : asset('lms/assets/images/placeholder/profile.jpg'); @endphp @if ($isAdmin) @endif @endforeach
{{ translate('Profile') }} {{ translate('Email') }} {{ translate('Phone') }} {{ translate('Total Course') }} {{ translate('Email Verify') }} {{ translate('Status') }} {{ translate('Action') }}
instructor
{{ $firstName . ' ' . $lastName }}
@if ($designation)

{{ $designation }}

@endif
{{ $instructor->email ?? '' }} {{ $userInfo?->phone ?? '' }} {{ $instructor?->courses?->count() }} @php if ($userInfo?->id) { $action = route($statusChangeRoute, $userInfo?->id); } @endphp
@if ($instructor->trashed()) @php $title = translate('Do you want to Delete.'); $text = translate( 'If You delete,Instructor and Instructor related all data will be delete permanently.', ); @endphp @if ($isAdmin) @endif @else @endif
{{ $instructors->links('portal::admin.pagination.paginate') }}