@extends('layouts.main-app') @section('title', 'News and Promotions') @section('content') @include('layouts.navbar')

Filter BY

Reset

Category

@if(request('category'))
@php // Find the category name based on the selected category id $selectedCategory = $categories->firstWhere('id', request('category')); @endphp @if($selectedCategory) @endif
@endif

Date from

Date to

RECENT POSTS

@foreach ($newsItems->take(3) as $newsItem)
{{ $newsItem->title }}

{{ $newsItem->created_at->format('M d, Y') }}

{{ Str::limit($newsItem->name, 50) }}


@endforeach

OPEN JOB POSITIONS

@php // Filter careers where open_position is not zero and shuffle the remaining ones $filteredCareers = $careers->filter(function ($career) { return $career->open_position > 0; })->shuffle(); @endphp @foreach ($filteredCareers as $career)

{{ $career->mpc->mpc_name }}

{{ $career->title }}

{{ $career->location->location_name }} | {{ $career->created_at->diffForHumans() }}

@endforeach

Showing {{ $newsItems->firstItem() }}-{{ $newsItems->lastItem() }} of {{ $newsItems->total() }} results

@if ($newsItems->onFirstPage()) @else @endif
@foreach ($newsItems->getUrlRange(1, $newsItems->lastPage()) as $page => $url) @endforeach
@if ($newsItems->hasMorePages()) @else @endif
@include('layouts.newsletter')
@include('layouts.footer') @endsection