@php $args = [ '@limit' => $data->post_number?$data->post_number:20, '@sort' => $data->sorttype?$data->sorttype:1 ]; $title = null; if($data->dynamic_id && $dynamic = $helper->getDynamic(['id' => $data->dynamic_id])){ $args['dynamic_id'] = $data->dynamic_id; $title = $dynamic->name; } if($data->category_id && $category = $helper->getPostCategory(['id' => $data->category_id])){ $args['@category'] = $data->category_id; if(!$title) $title = $category->name; } if($data->content_type && $data->content_type != 'all'){ $args['content_type'] = $data->content_type; } if($data->title) $title = $data->title; $args['trashed_status'] = 0; @endphp @if (count($posts = $helper->getPosts($args)))

{{$title?$title:'Mới nhất'}}

@foreach ($posts as $post) @php $i = $loop->index+1; if($i < 10) $i = "0$i"; if($post->trashed_status) continue; @endphp @endforeach
@endif