@extends('layouts.app') @section('content')

Job Details

{{ $job->title }}

{{ $job->city }}, {{ $job->country }}

{{ ucfirst(str_replace('_', ' ', $job->job_type)) }} {{ ucfirst($job->work_mode) }} @if ($job->salary_min || $job->salary_max) ${{ $job->salary_min }} - ${{ $job->salary_max }} @endif
@if ($job->media->where('type', 'image')->count())
@foreach ($job->media->where('type', 'image') as $img) @endforeach
@endif
Job Description
{!! nl2br(strip_tags($job->description)) !!}
@if ($job->responsibilities)
Responsibilities
{!! nl2br(strip_tags($job->responsibilities)) !!}
@endif @if ($job->requirements)
Requirements
{!! nl2br(strip_tags($job->requirements)) !!}
@endif @if ($job->skills)
Skills
@php $skills = is_array($job->skills) ? $job->skills : json_decode($job->skills, true); @endphp @foreach ($skills ?? [] as $skill) {{ $skill }} @endforeach
@endif
@php $video = $job->media->where('type', 'video')->first(); function getEmbedUrl($url) { if (str_contains($url, 'youtube.com/watch')) { return str_replace('watch?v=', 'embed/', $url); } if (str_contains($url, 'youtu.be/')) { $id = substr($url, strrpos($url, '/') + 1); return "https://www.youtube.com/embed/" . $id; } if (str_contains($url, 'youtube.com/shorts/')) { $id = substr($url, strrpos($url, '/') + 1); return "https://www.youtube.com/embed/" . $id; } if (str_contains($url, 'vimeo.com/')) { $id = substr($url, strrpos($url, '/') + 1); return "https://player.vimeo.com/video/" . $id; } return $url; // fallback } @endphp @if ($video)
@endif

Experience: {{ $job->experience_min }} - {{ $job->experience_max }} years

Location:{{ $job->address }} {{ $job->city }}, {{ $job->state }}

Posted: {{ $job->created_at->diffForHumans() }}

@endsection