from server

This commit is contained in:
root 2023-02-17 10:28:52 +05:00
parent 3e5891a5af
commit 58b8caca8f
5 changed files with 7 additions and 5 deletions

View File

@ -59,7 +59,7 @@ class postsController extends Controller
if(!is_null($post)) {
$post->url = $this->pageUrl('post',['id'=>$post->id,'slug'=>$post->slug]);
$post->url = $this->pageUrl('new/newPost',['id'=>$post->id,'slug'=>$post->slug]);
$obj = Db::table('vdomah_blogviews_views')
->where('post_id', $post->getKey());

View File

@ -238,6 +238,10 @@ class Posts extends ComponentBase
'featured' => $featured,
'morque' => $morque,
'typePost' => empty($this->property('typePost')) ? null : $this->property('typePost'),
// 'typePost' => empty($this->property('typePost')) ? null : is_array($this->property('typePost'))
// ? $this->property('typePost')
// : preg_split('/,\s*/', $this->property('typePost'), -1, PREG_SPLIT_NO_EMPTY),
'postGroup' => empty($this->property('categoryGroup')) ? null : $this->property('categoryGroup'),
'search' => trim(input('q')),
'category' => $category,

View File

@ -494,7 +494,6 @@ class Post extends Model
if ($typePost !== null) {
$typePost = is_array($typePost) ? $typePost : [$typePost];
$query->whereIn('type_post', $typePost);
}

View File

@ -120,9 +120,9 @@ default = 0
<script src="{{ 'assets/new/jquery.js'|theme}}"></script>
<script src="{{ 'assets/new/scripts/swiper/swiper-bundle.min.js'|theme}}"></script>
<script src="{{ 'assets/new/copy.js'|theme}}"></script>
{% framework extras %}
{% scripts %}
{% framework extras %}

View File

@ -41,7 +41,6 @@ function onStart(){
<a href="{{'new/newPost'|page({id:post.id,slug:post.slug})}}">
<div class="time">{{post.published_at|date('H:i')}}</div>
<p class="content">
{{merged}}
{{ post.title }}
</p>
</a>