@extends('layouts.dashboard') @section('content')
entries

All Portfolios

@foreach ($portfolios as $portfolio) @endforeach
Title Country Attachment Department Added By Actions
{{ $portfolio->title }} {{ $portfolio->country->name ?? '-' }} @if ($portfolio->attachment) @php $attachmentUrl = asset('storage/' . $portfolio->attachment); $extension = pathinfo($portfolio->attachment, PATHINFO_EXTENSION); $imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'webp']; @endphp
@if (in_array(strtolower($extension), $imageExtensions)) Attachment @else {{ basename($portfolio->attachment) }} @endif View
@else - @endif
{{ $portfolio->department->name ?? '-' }} {{ $portfolio->creator->name ?? '-' }}
{{ $portfolios->links() }}
@endsection