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
4164b4c1
Commit
4164b4c1
authored
May 16, 2020
by
Aan Choesni Herlingga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added footer front view
parent
3a1c4f73
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
303 additions
and
251 deletions
+303
-251
app/Http/Controllers/Webprofile/Front/AgendaController.php
+42
-35
app/Http/Controllers/Webprofile/Front/ArchiveController.php
+42
-35
app/Http/Controllers/Webprofile/Front/CategoryController.php
+43
-36
app/Http/Controllers/Webprofile/Front/DownloadController.php
+27
-25
app/Http/Controllers/Webprofile/Front/ErrorController.php
+32
-25
app/Http/Controllers/Webprofile/Front/FrontController.php
+2
-0
app/Http/Controllers/Webprofile/Front/InformationController.php
+42
-35
app/Http/Controllers/Webprofile/Front/PageController.php
+30
-23
app/Http/Controllers/Webprofile/Front/PostController.php
+43
-37
No files found.
app/Http/Controllers/Webprofile/Front/AgendaController.php
View file @
4164b4c1
...
...
@@ -22,57 +22,64 @@ class AgendaController extends Controller
if
(
Session
::
get
(
'selected_language'
)
==
'id'
)
{
$data
=
$this
->
getDataId
(
$setting
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.archive'
,
$data
)
->
withTitle
(
'Agenda'
);
}
else
if
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.archive'
,
$data
)
->
withTitle
(
'Agenda'
);
}
elseif
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
$data
=
$this
->
getDataEn
(
$setting
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.en.archive'
,
$data
)
->
withTitle
(
'Agenda'
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.en.archive'
,
$data
)
->
withTitle
(
'Agenda'
);
}
}
public
function
getDataId
(
$setting
)
{
$setting
=
webprofilesetting
();
$data
=
Information
::
where
(
'info_status'
,
'1'
)
->
orderBy
(
'event_date'
,
'desc'
)
->
paginate
(
$setting
[
'post_per_page'
]);
$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
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$setting
=
webprofilesetting
();
$data
=
Information
::
where
(
'info_status'
,
'1'
)
->
orderBy
(
'event_date'
,
'desc'
)
->
paginate
(
$setting
[
'post_per_page'
]);
$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
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'footer'
=>
$footer
,
];
return
$data
;
}
public
function
getDataEn
(
$setting
)
{
$setting
=
webprofilesetting
();
$data
=
Information
::
where
(
'info_status'
,
'1'
)
->
orderBy
(
'event_date'
,
'desc'
)
->
paginate
(
$setting
[
'post_per_page'
]);
$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
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$setting
=
webprofilesetting
();
$data
=
Information
::
where
(
'info_status'
,
'1'
)
->
orderBy
(
'event_date'
,
'desc'
)
->
paginate
(
$setting
[
'post_per_page'
]);
$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
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'footer'
=>
$footer
,
];
return
$data
;
...
...
app/Http/Controllers/Webprofile/Front/ArchiveController.php
View file @
4164b4c1
...
...
@@ -21,57 +21,64 @@ class ArchiveController extends Controller
if
(
Session
::
get
(
'selected_language'
)
==
'id'
)
{
$data
=
$this
->
getDataId
(
$setting
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.archive'
,
$data
)
->
withTitle
(
'Arsip'
);
}
else
if
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.archive'
,
$data
)
->
withTitle
(
'Arsip'
);
}
elseif
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
$data
=
$this
->
getDataEn
(
$setting
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.en.archive'
,
$data
)
->
withTitle
(
'Archive'
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.en.archive'
,
$data
)
->
withTitle
(
'Archive'
);
}
}
public
function
getDataId
(
$setting
)
{
$setting
=
webprofilesetting
();
$data
=
Posts
::
where
(
'post_status'
,
'1'
)
->
orderBy
(
'post_date'
,
'desc'
)
->
paginate
(
$setting
[
'post_per_page'
]);
$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
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$setting
=
webprofilesetting
();
$data
=
Posts
::
where
(
'post_status'
,
'1'
)
->
orderBy
(
'post_date'
,
'desc'
)
->
paginate
(
$setting
[
'post_per_page'
]);
$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
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'footer'
=>
$footer
,
];
return
$data
;
}
public
function
getDataEn
(
$setting
)
{
$setting
=
webprofilesetting
();
$data
=
Posts
::
where
(
'post_status'
,
'1'
)
->
orderBy
(
'post_date'
,
'desc'
)
->
paginate
(
$setting
[
'post_per_page'
]);
$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
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$setting
=
webprofilesetting
();
$data
=
Posts
::
where
(
'post_status'
,
'1'
)
->
orderBy
(
'post_date'
,
'desc'
)
->
paginate
(
$setting
[
'post_per_page'
]);
$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
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'footer'
=>
$footer
,
];
return
$data
;
...
...
app/Http/Controllers/Webprofile/Front/CategoryController.php
View file @
4164b4c1
...
...
@@ -21,59 +21,66 @@ class CategoryController extends Controller
if
(
Session
::
get
(
'selected_language'
)
==
'id'
)
{
$data
=
$this
->
getDataId
(
$setting
,
$category
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.archive'
,
$data
)
->
withTitle
(
'Arsip'
);
}
else
if
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.archive'
,
$data
)
->
withTitle
(
'Arsip'
);
}
elseif
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
$data
=
$this
->
getDataEn
(
$setting
,
$category
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.en.archive'
,
$data
)
->
withTitle
(
'Archive'
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.en.archive'
,
$data
)
->
withTitle
(
'Archive'
);
}
}
public
function
getDataId
(
$setting
,
$category
)
{
$setting
=
webprofilesetting
();
$setting
=
webprofilesetting
();
$findCategory
=
Categories
::
where
(
'name'
,
$category
)
->
first
();
$data
=
Posts
::
where
(
'categories'
,
$findCategory
->
id
)
->
where
(
'post_status'
,
'1'
)
->
orderBy
(
'post_date'
,
'desc'
)
->
paginate
(
$setting
[
'post_per_page'
]);
$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
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$data
=
Posts
::
where
(
'categories'
,
$findCategory
->
id
)
->
where
(
'post_status'
,
'1'
)
->
orderBy
(
'post_date'
,
'desc'
)
->
paginate
(
$setting
[
'post_per_page'
]);
$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
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'footer'
=>
$footer
,
];
return
$data
;
}
public
function
getDataEn
(
$setting
,
$category
)
{
$setting
=
webprofilesetting
();
$findCategory
=
Categories
::
where
(
'name'
,
$category
)
->
first
();
$data
=
Posts
::
with
([
'rEn'
])
->
where
(
'categories'
,
$findCategory
->
id
)
->
where
(
'post_status'
,
'1'
)
->
orderBy
(
'post_date'
,
'desc'
)
->
paginate
(
$setting
[
'post_per_page'
]);
$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
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$setting
=
webprofilesetting
();
$findCategory
=
Categories
::
where
(
'name'
,
$category
)
->
first
();
$data
=
Posts
::
with
([
'rEn'
])
->
where
(
'categories'
,
$findCategory
->
id
)
->
where
(
'post_status'
,
'1'
)
->
orderBy
(
'post_date'
,
'desc'
)
->
paginate
(
$setting
[
'post_per_page'
]);
$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
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'footer'
=>
$footer
,
];
return
$data
;
...
...
app/Http/Controllers/Webprofile/Front/DownloadController.php
View file @
4164b4c1
...
...
@@ -15,56 +15,58 @@ class DownloadController extends Controller
{
public
function
index
()
{
$categoriesFile
=
CategoriesFile
::
where
(
'is_active'
,
1
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
with
([
'rFile'
])
->
get
();
$setting
=
webprofilesetting
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$hot
=
Posts
::
where
(
'post_status'
,
'1'
)
->
orderby
(
'viewer'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$categories
=
Categories
::
where
(
'is_active'
,
'1'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$categoriesFile
=
CategoriesFile
::
where
(
'is_active'
,
1
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
with
([
'rFile'
])
->
get
();
$setting
=
webprofilesetting
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$hot
=
Posts
::
where
(
'post_status'
,
'1'
)
->
orderby
(
'viewer'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$categories
=
Categories
::
where
(
'is_active'
,
'1'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$data
=
[
'categoriesFile'
=>
$categoriesFile
,
'setting'
=>
$setting
,
'menu'
=>
$menu
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'categoriesFile'
=>
$categoriesFile
,
'setting'
=>
$setting
,
'menu'
=>
$menu
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'footer'
=>
$footer
,
];
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.download'
,
$data
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.download'
,
$data
);
}
public
function
downloadFile
(
$id
)
{
$setting
=
webprofilesetting
();
$fileModel
=
new
File
;
$fileRepo
=
new
FileRepository
(
$fileModel
);
$fileModel
=
new
File
()
;
$fileRepo
=
new
FileRepository
(
$fileModel
);
$dbfile
=
File
::
find
(
$id
);
if
(
$setting
[
'external_storage'
]
==
1
)
{
$file
=
$setting
[
'url_static'
]
.
'/'
.
$setting
[
'directory'
]
.
'/file/'
.
$dbfile
->
file
;
$file
=
$setting
[
'url_static'
]
.
'/'
.
$setting
[
'directory'
]
.
'/file/'
.
$dbfile
->
file
;
}
else
{
$file
=
url
(
'/storage/file/'
.
$dbfile
->
file
);
$file
=
url
(
'/storage/file/'
.
$dbfile
->
file
);
}
$fileRepo
->
countDownload
(
$dbfile
);
// if ($fileRepo->is_url_exist($file)) {
$filename
=
$dbfile
->
slug
;
$tempImage
=
tempnam
(
sys_get_temp_dir
(),
$filename
);
stream_context_set_default
([
$filename
=
$dbfile
->
slug
;
$tempImage
=
tempnam
(
sys_get_temp_dir
(),
$filename
);
stream_context_set_default
([
'ssl'
=>
[
'verify_peer'
=>
false
,
'verify_peer_name'
=>
false
,
],
]);
copy
(
$file
,
$tempImage
);
copy
(
$file
,
$tempImage
);
return
response
()
->
download
(
$tempImage
,
$filename
);
return
response
()
->
download
(
$tempImage
,
$filename
);
// } else {
// Alert::error('File tidak ditemukan');
// return redirect()->back();
...
...
app/Http/Controllers/Webprofile/Front/ErrorController.php
View file @
4164b4c1
...
...
@@ -20,47 +20,54 @@ class ErrorController extends Controller
if
(
Session
::
get
(
'selected_language'
)
==
'id'
)
{
$data
=
$this
->
getDataId
(
$setting
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.page'
,
$data
);
}
else
if
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.page'
,
$data
);
}
elseif
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
$data
=
$this
->
getDataEn
(
$setting
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.page'
,
$data
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.page'
,
$data
);
}
}
public
function
getDataId
(
$setting
)
{
$setting
=
webprofilesetting
();
$data
=
new
Pages
;
$data
->
title
=
'Page Not Found'
;
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$setting
=
webprofilesetting
();
$data
=
new
Pages
();
$data
->
title
=
'Page Not Found'
;
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'footer'
=>
$footer
,
];
return
$data
;
}
public
function
getDataEn
(
$setting
)
{
$setting
=
webprofilesetting
();
$data
=
new
Pages
;
$data
->
title
=
'Page Not Found'
;
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$setting
=
webprofilesetting
();
$data
=
new
Pages
();
$data
->
title
=
'Page Not Found'
;
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'footer'
=>
$footer
,
];
return
$data
;
...
...
app/Http/Controllers/Webprofile/Front/FrontController.php
View file @
4164b4c1
...
...
@@ -79,6 +79,7 @@ class FrontController extends Controller
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$body
=
Design
::
where
(
'name_design'
,
'body'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$data
=
[
'posts'
=>
$posts
,
...
...
@@ -93,6 +94,7 @@ class FrontController extends Controller
'widget_left'
=>
$widget_left
,
'body'
=>
$body
,
'setting'
=>
$setting
,
'footer'
=>
$footer
,
];
return
$data
;
...
...
app/Http/Controllers/Webprofile/Front/InformationController.php
View file @
4164b4c1
...
...
@@ -22,63 +22,70 @@ class InformationController extends Controller
if
(
Session
::
get
(
'selected_language'
)
==
'id'
)
{
$data
=
$this
->
getDataId
(
$setting
,
$title
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.information'
,
$data
);
}
else
if
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.information'
,
$data
);
}
elseif
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
$data
=
$this
->
getDataEn
(
$setting
,
$title
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.en.information'
,
$data
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.en.information'
,
$data
);
}
}
public
function
getDataId
(
$setting
,
$title
)
{
$setting
=
webprofilesetting
();
$data
=
Information
::
where
(
'slug'
,
$title
)
->
first
();
$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
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$setting
=
webprofilesetting
();
$data
=
Information
::
where
(
'slug'
,
$title
)
->
first
();
$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
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$viewer
[
'viewer'
]
=
(
int
)
$data
->
viewer
+
1
;
$data
->
update
(
$viewer
);
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'footer'
=>
$footer
,
];
return
$data
;
}
public
function
getDataEn
(
$setting
,
$title
)
{
$setting
=
webprofilesetting
();
$data
=
Information
::
where
(
'slug'
,
$title
)
->
first
();
$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
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$setting
=
webprofilesetting
();
$data
=
Information
::
where
(
'slug'
,
$title
)
->
first
();
$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
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$viewer
[
'viewer'
]
=
(
int
)
$data
->
viewer
+
1
;
$data
->
update
(
$viewer
);
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'footer'
=>
$footer
,
];
return
$data
;
...
...
app/Http/Controllers/Webprofile/Front/PageController.php
View file @
4164b4c1
...
...
@@ -20,45 +20,52 @@ class PageController extends Controller
if
(
Session
::
get
(
'selected_language'
)
==
'id'
)
{
$data
=
$this
->
getDataId
(
$setting
,
$title
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.page'
,
$data
);
}
else
if
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.page'
,
$data
);
}
elseif
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
$data
=
$this
->
getDataEn
(
$setting
,
$title
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.en.page'
,
$data
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.en.page'
,
$data
);
}
}
public
function
getDataId
(
$setting
,
$title
)
{
$setting
=
webprofilesetting
();
$data
=
Pages
::
where
(
'slug'
,
$title
)
->
first
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$setting
=
webprofilesetting
();
$data
=
Pages
::
where
(
'slug'
,
$title
)
->
first
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'footer'
=>
$footer
,
];
return
$data
;
}
public
function
getDataEn
(
$setting
,
$title
)
{
$setting
=
webprofilesetting
();
$data
=
Pages
::
with
([
'rEn'
])
->
where
(
'slug'
,
$title
)
->
first
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$setting
=
webprofilesetting
();
$data
=
Pages
::
with
([
'rEn'
])
->
where
(
'slug'
,
$title
)
->
first
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'footer'
=>
$footer
,
];
return
$data
;
...
...
app/Http/Controllers/Webprofile/Front/PostController.php
View file @
4164b4c1
...
...
@@ -2,7 +2,6 @@
namespace
App\Http\Controllers\Webprofile\Front
;
use
Illuminate\Http\Request
;
use
App\Http\Controllers\Controller
;
use
App\Models\Webprofile\Categories
;
use
App\Models\Webprofile\Design
;
...
...
@@ -22,63 +21,70 @@ class PostController extends Controller
if
(
Session
::
get
(
'selected_language'
)
==
'id'
)
{
$data
=
$this
->
getDataId
(
$setting
,
$title
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.post'
,
$data
);
}
else
if
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.post'
,
$data
);
}
elseif
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
$data
=
$this
->
getDataEn
(
$setting
,
$title
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.en.post'
,
$data
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.en.post'
,
$data
);
}
}
public
function
getDataId
(
$setting
,
$title
)
{
$setting
=
webprofilesetting
();
$data
=
Posts
::
where
(
'slug'
,
$title
)
->
first
();
$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
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$setting
=
webprofilesetting
();
$data
=
Posts
::
where
(
'slug'
,
$title
)
->
first
();
$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
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$viewer
[
'viewer'
]
=
(
int
)
$data
->
viewer
+
1
;
$viewer
[
'viewer'
]
=
(
int
)
$data
->
viewer
+
1
;
$data
->
update
(
$viewer
);
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'footer'
=>
$footer
,
];
return
$data
;
}
public
function
getDataEn
(
$setting
,
$title
)
{
$setting
=
webprofilesetting
();
$data
=
Posts
::
with
([
'rEn'
])
->
where
(
'slug'
,
$title
)
->
first
();
$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
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$setting
=
webprofilesetting
();
$data
=
Posts
::
with
([
'rEn'
])
->
where
(
'slug'
,
$title
)
->
first
();
$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
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$footer
=
Design
::
where
(
'name_design'
,
'like'
,
'%footer_row%'
)
->
get
();
$viewer
[
'viewer'
]
=
(
int
)
$data
->
viewer
+
1
;
$data
->
update
(
$viewer
);
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
'footer'
=>
$footer
,
];
return
$data
;
...
...
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