from server

This commit is contained in:
root 2023-02-13 21:15:38 +05:00
parent d85ad7a542
commit 3e5891a5af
3 changed files with 23 additions and 4 deletions

View File

@ -34,7 +34,7 @@ class postsController extends Controller
'typePost' => input('typePost'),
'postGroup' => input('group'),
'published' => true,
'select' => ['id','title','slug','published_at', 'more_photo','afisha_phone', 'afisha_address', DB::raw("IF(featured_image<>'',concat('$path',featured_image),featured_image) as main_image")]
'select' => ['id','title','slug','published_at', 'more_photo','afisha_phone', 'afisha_address', 'afisha_phone_new', DB::raw("IF(featured_image<>'',concat('$path',featured_image),featured_image) as main_image")]
];
if(request()->has('featured')){
@ -55,7 +55,7 @@ class postsController extends Controller
//posts item
public function show($locale,$id){
$post = $this->Post::find($id,['id','content_html','author','slug', 'afisha_phone', 'afisha_address']);
$post = $this->Post::find($id,['id','content_html','author','slug', 'afisha_phone', 'afisha_address', 'afisha_phone_new',]);
if(!is_null($post)) {

View File

@ -120,8 +120,10 @@ 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>
{% scripts %}
{% framework extras %}
{% scripts %}
<!-- javascript end

View File

@ -8,8 +8,24 @@ noPostsMessage = "No posts found"
sortOrder = "created_at desc"
categoryPage = 404
postPage = 404
[blogPosts blogPosts2]
pageNumber = "{{ :page }}"
typePost = "world"
postsPerPage = 10
noPostsMessage = "No posts found"
sortOrder = "created_at desc"
categoryPage = 404
postPage = 404
==
<?php
function onStart(){
$this["merged"]=$this["blogPosts"]."qq";
}
?>
==
{% set posts = blogPosts.posts %}
{% set posts_world = blogPosts2.posts %}
<!-- ASIDE MOBILE ============-->
@ -20,11 +36,12 @@ postPage = 404
<ul class="aside-mobile-items">
{% for post in posts %}
<li>
<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>