@extends('staff::layouts.default') @section('title', 'Members') @section('content') @php $type = strtolower($categoryName); $baseTypes = ['senior team', 'staff', 'academy', 'management']; // If type is NOT one of the base types, show all $showAll = !in_array($type, $baseTypes); $showTitle = $type === 'academy' || $type === 'staff' || $type === 'senior team' || $showAll; $showAcademy = $type === 'academy' || $showAll; @endphp
Members
@if($showTitle) @endif @if($showAcademy) @endif @php $counter = 1; @endphp @foreach($data as $k => $v) @php $catName = strtolower(str_replace(' ', '_', $v->category)); $folder_name = 'visakha_file/' . $catName; $oldImg = 'https://cdntest.uyfcapp.com/public/asia/images/visakha_file/' . $catName . '/' . $v->image_url; $fallback = \Helper::setCustomerImageSrc($folder_name . '/', $v->image_url); @endphp @if($showTitle) @endif @if($showAcademy) @endif @endforeach
# Profile Latin Name Name Category PositionTitleAcademyNumber Year Register Date Actions
{{ ($data->currentPage() - 1) * $data->perPage() + $counter++ }} {{ $v->name_en }} {{ $v->name_kh }} {{ $v->category }} {{ $v->position }}{{ $v->title }}{{ $v->academy }}{{ $v->number }} {{ $v->year }} {{ $v->created_at->format('d-M-Y') }}
@if(count($data))
@include('staff::elements.paginate') @endif
@endsection @section('script') @endsection