Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webprofile-jwg2024
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Siti Aisah
webprofile-jwg2024
Commits
bab1d640
Commit
bab1d640
authored
Aug 24, 2020
by
Aan Choesni Herlingga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
berita terkait
parent
4c0f6f0e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
+30
-0
app/Http/Controllers/Webprofile/Front/PostController.php
+4
-0
resources/views/webprofile/front/jollyany/en/post.blade.php
+13
-0
resources/views/webprofile/front/jollyany/post.blade.php
+13
-0
No files found.
app/Http/Controllers/Webprofile/Front/PostController.php
View file @
bab1d640
...
...
@@ -34,6 +34,7 @@ class PostController extends Controller
{
$setting
=
webprofilesetting
();
$data
=
Posts
::
where
(
'slug'
,
$title
)
->
first
();
$terkait
=
Posts
::
where
(
'categories'
,
$data
->
categories
)
->
orderBy
(
'created_at'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$resend
=
Posts
::
where
(
'post_status'
,
'1'
)
->
orderby
(
'post_date'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$hot
=
Posts
::
where
(
'post_status'
,
'1'
)
->
orderby
(
'viewer'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$categories
=
Categories
::
where
(
'is_active'
,
'1'
)
->
get
();
...
...
@@ -48,6 +49,7 @@ class PostController extends Controller
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'terkait'
=>
$terkait
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
...
...
@@ -64,6 +66,7 @@ class PostController extends Controller
{
$setting
=
webprofilesetting
();
$data
=
Posts
::
with
([
'rEn'
])
->
where
(
'slug'
,
$title
)
->
first
();
$terkait
=
Posts
::
with
([
'rEn'
])
->
where
(
'categories'
,
$data
->
categories
)
->
orderBy
(
'created_at'
,
'desc'
)
->
limit
(
'4'
)
->
get
();
$resend
=
Posts
::
with
([
'rEn'
])
->
where
(
'post_status'
,
'1'
)
->
orderby
(
'post_date'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$hot
=
Posts
::
with
([
'rEn'
])
->
where
(
'post_status'
,
'1'
)
->
orderby
(
'viewer'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$categories
=
Categories
::
with
([
'rEn'
])
->
where
(
'is_active'
,
'1'
)
->
get
();
...
...
@@ -78,6 +81,7 @@ class PostController extends Controller
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'terkait'
=>
$terkait
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
...
...
resources/views/webprofile/front/jollyany/en/post.blade.php
View file @
bab1d640
...
...
@@ -38,6 +38,19 @@
</center>
@endif
@endif
<br>
<div class="
widget
col
-
md
-
4
pull
-
right
related
hidden
-
sm
hidden
-
xs
kaitan
" style="
margin
-
bottom
:
5
px
;
">
<h4 class="
h4_kaitan
"><strong>berita terkait </strong></h4>
<div class="
isi_kaitan
">
<div class="
content_kaitan
">
<ul class="
ul_kaitan
nav
nav
-
tabs
nav
-
stacked
">
@foreach(
$terkait
as
$valTerkait
)
<li><strong><a title="
{
!!
$valTerkait
->
rEn
->
title
!!
}
" href="
{
!!
url
(
'post/'
.
$valTerkait
->
slug
)
!!
}
">{!!
$valTerkait->rEn
->title !!}</a></strong></li>
@endforeach
</ul>
</div>
</div>
</div>
{!!
$data->rEn
->content !!}
</div>
</div>
...
...
resources/views/webprofile/front/jollyany/post.blade.php
View file @
bab1d640
...
...
@@ -45,6 +45,19 @@
</center>
@endif
@endif
<br>
<div class="
widget
col
-
md
-
4
pull
-
right
related
hidden
-
sm
hidden
-
xs
kaitan
" style="
margin
-
bottom
:
5
px
;
">
<h4 class="
h4_kaitan
"><strong>berita terkait </strong></h4>
<div class="
isi_kaitan
">
<div class="
content_kaitan
">
<ul class="
ul_kaitan
nav
nav
-
tabs
nav
-
stacked
">
@foreach(
$terkait
as
$valTerkait
)
<li><strong><a title="
{
!!
$valTerkait
->
title
!!
}
" href="
{
!!
url
(
'post/'
.
$valTerkait
->
slug
)
!!
}
">{!!
$valTerkait->title
!!}</a></strong></li>
@endforeach
</ul>
</div>
</div>
</div>
{!!
$data->content
!!}
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment