@if (is_plugin_active('blog')) @php $limit = (int) Arr::get($config, 'limit'); $posts = match (Arr::get($config, 'type')) { 'recent' => get_recent_posts($limit), default => get_popular_posts($limit), }; @endphp @switch($config['style']) @case('sidebar')
@if ($title = $config['name'])

{{ $title }}

@endif @foreach($posts as $post)
{{ $post->name }}
@endforeach
@break @default
@if ($title = $config['title'])

{{ $title }}

@endif
@foreach($posts as $post)
{!! Theme::partial('posts.item', ['post' => $post]) !!}
@endforeach
@endswitch @endif