@foreach($provinces as $client) @if(isset($client->featured_image)) @php $college = $client; $url = config('filesystems.asset').'/'.'clients'.'/'.$college->user->name.'/featured_image'.'/'.$college->featured_image; $uploadedFile = pathinfo($url); $old_filename = $uploadedFile['filename']; $extension = $uploadedFile['extension']; $imageLink = config('filesystems.asset').'/'.'clients'.'/'.$college->user->name.'/featured_image'.'/'.$old_filename.'.webp'; @endphp @endif @endforeach
@foreach($states as $state)
@php $todayDate = date('d'); if($todayDate % 2 == 0){ $orderBy = 'ASC'; } else{ $orderBy = 'DESC'; } @endphp @foreach($state->verifiedActiveProvinceClientsClients()->where('featured_image','!=',null)->orderBy('company_name',$orderBy)->get() as $college) @php $url = config('filesystems.asset').'/'.'clients'.'/'.$college->user->name.'/featured_image'.'/'.$college->featured_image; $uploadedFile = pathinfo($url); $old_filename = $uploadedFile['filename']; $extension = $uploadedFile['extension']; $imageLink = config('filesystems.asset').'/'.'clients'.'/'.$college->user->name.'/featured_image'.'/'.$old_filename.'.webp'; @endphp @endforeach
@endforeach