@extends('frontend.layouts.app') @section('title') @endsection @section('seo') News | Anisabel Suites @endsection @section('content')

News

{{--
--}}

Featured News

@php function getYoutubeVideoId($url) { $pattern = '/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/'; preg_match($pattern, $url, $matches); return isset($matches[1]) ? $matches[1] : null; } @endphp @foreach ($featuredBlogs as $items)
@if ($items->thumbnail != null) Image @else @php $url = $items->link; $videoId = getYoutubeVideoId($url); @endphp @endif

{{ Str::limit($items->title, 50, '...') }}

{{ date('F j, Y', strtotime($items->created_at)) }}

@endforeach
@endsection