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
ba184106
Commit
ba184106
authored
5 years ago
by
Aan Choesni Herlingga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
front error
parent
f839aeb4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
1 deletions
+69
-1
app/Http/Controllers/Webprofile/Front/ErrorController.php
+68
-0
routes/webprofile/front.php
+1
-1
No files found.
app/Http/Controllers/Webprofile/Front/ErrorController.php
0 → 100644
View file @
ba184106
<?php
namespace
App\Http\Controllers\Webprofile\Front
;
use
App\Http\Controllers\Controller
;
use
App\Models\Webprofile\Design
;
use
App\Models\Webprofile\Menu
;
use
App\Models\Webprofile\Pages
;
use
Session
;
class
ErrorController
extends
Controller
{
public
function
index
()
{
$setting
=
webprofilesetting
();
if
(
!
Session
::
has
(
'selected_language'
))
{
session
([
'selected_language'
=>
'id'
]);
}
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'
)
{
$data
=
$this
->
getDataEn
(
$setting
);
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
();
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
];
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
();
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
];
return
$data
;
}
}
This diff is collapsed.
Click to expand it.
routes/webprofile/front.php
View file @
ba184106
...
@@ -7,7 +7,7 @@ Route::group(['namespace' => 'Webprofile\Front'], function () {
...
@@ -7,7 +7,7 @@ Route::group(['namespace' => 'Webprofile\Front'], function () {
Route
::
get
(
'category/{id}'
,
'CategoryController@index'
)
->
name
(
'category'
);
Route
::
get
(
'category/{id}'
,
'CategoryController@index'
)
->
name
(
'category'
);
Route
::
get
(
'information/{id}'
,
'InformationController@index'
)
->
name
(
'infomation'
);
Route
::
get
(
'information/{id}'
,
'InformationController@index'
)
->
name
(
'infomation'
);
Route
::
get
(
'agenda'
,
'AgendaController@index'
)
->
name
(
'agenda'
);
Route
::
get
(
'agenda'
,
'AgendaController@index'
)
->
name
(
'agenda'
);
Route
::
get
(
'error'
,
'
FrontController@error
'
)
->
name
(
'error'
);
Route
::
get
(
'error'
,
'
ErrorController@index
'
)
->
name
(
'error'
);
Route
::
get
(
'download'
,
'FrontController@download'
)
->
name
(
'download'
);
Route
::
get
(
'download'
,
'FrontController@download'
)
->
name
(
'download'
);
Route
::
get
(
'downloadlink/{data}'
,
'FrontController@downloadFile'
)
->
name
(
'downloadFile'
);
Route
::
get
(
'downloadlink/{data}'
,
'FrontController@downloadFile'
)
->
name
(
'downloadFile'
);
});
});
This diff is collapsed.
Click to expand it.
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