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
b296ec58
Commit
b296ec58
authored
Dec 13, 2019
by
Aan Choesni Herlingga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
master setting
parent
41af4b84
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
375 additions
and
13 deletions
+375
-13
app/Http/Controllers/Webprofile/Backend/SettingController.php
+123
-0
app/Http/Requests/SettingRequest.php
+43
-0
resources/lang/en/label.php
+2
-0
resources/lang/id/label.php
+3
-0
resources/views/webprofile/backend/categories/create.blade.php
+1
-1
resources/views/webprofile/backend/categories/edit.blade.php
+1
-1
resources/views/webprofile/backend/categories/index.blade.php
+1
-1
resources/views/webprofile/backend/informations/create.blade.php
+1
-1
resources/views/webprofile/backend/informations/edit.blade.php
+1
-1
resources/views/webprofile/backend/informations/index.blade.php
+1
-1
resources/views/webprofile/backend/layouts/navigations/admin.blade.php
+1
-1
resources/views/webprofile/backend/pages/create.blade.php
+1
-1
resources/views/webprofile/backend/pages/edit.blade.php
+1
-1
resources/views/webprofile/backend/pages/index.blade.php
+1
-1
resources/views/webprofile/backend/posts/create.blade.php
+1
-1
resources/views/webprofile/backend/posts/edit.blade.php
+1
-1
resources/views/webprofile/backend/posts/index.blade.php
+1
-1
resources/views/webprofile/backend/setting/create.blade.php
+65
-0
resources/views/webprofile/backend/setting/edit.blade.php
+65
-0
resources/views/webprofile/backend/setting/index.blade.php
+60
-0
routes/webprofile/backend.php
+1
-0
No files found.
app/Http/Controllers/Webprofile/Backend/SettingController.php
0 → 100644
View file @
b296ec58
<?php
namespace
App\Http\Controllers\Webprofile\Backend
;
use
App\Models\Webprofile\Setting
;
use
Illuminate\Http\Request
;
use
App\Http\Controllers\Controller
;
use
Validator
;
use
Uuid
;
use
Alert
;
use
Session
;
use
Crypt
;
use
App\Helpers\InseoHelper
;
use
App\Http\Requests\SettingRequest
;
use
Auth
;
class
SettingController
extends
Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public
function
index
()
{
$data
=
Setting
::
orderBy
(
'name_setting'
,
'ASC'
)
->
get
();
$data
=
[
'data'
=>
$data
,
];
return
view
(
'webprofile.backend.setting.index'
,
$data
)
->
withTitle
(
trans
(
'feature.setting'
));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public
function
create
()
{
return
view
(
'webprofile.backend.setting.create'
)
->
withTitle
(
trans
(
'feature.create_setting'
));
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public
function
store
(
SettingRequest
$request
)
{
$data
=
$request
->
except
(
'_token'
);
$data
[
'userid_created'
]
=
Auth
::
user
()
->
id
;
$data
[
'userid_updated'
]
=
Auth
::
user
()
->
id
;
Setting
::
create
(
$data
);
Alert
::
success
(
'Data berhasil disimpan'
)
->
persistent
(
'Ok'
);
$successmessage
=
"Proses Tambah Pengaturan Berhasil !!"
;
return
redirect
()
->
route
(
'settings.index'
)
->
with
(
'successMessage'
,
$successmessage
);
}
/**
* Display the specified resource.
*
* @param \App\Models\Setting $setting
* @return \Illuminate\Http\Response
*/
public
function
show
(
Setting
$setting
)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Models\Setting $setting
* @return \Illuminate\Http\Response
*/
public
function
edit
(
$id
)
{
try
{
$data
=
Setting
::
find
(
Crypt
::
decrypt
(
$id
));
return
view
(
'webprofile.backend.setting.edit'
,
compact
(
'data'
))
->
withTitle
(
trans
(
'feature.edit_setting'
));
}
catch
(
\Exception
$id
)
{
return
redirect
()
->
route
(
'settings.index'
);
}
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Models\Setting $setting
* @return \Illuminate\Http\Response
*/
public
function
update
(
SettingRequest
$request
,
$id
)
{
$setting
=
Setting
::
findOrFail
(
$id
);
$data
=
$request
->
except
(
'_token'
);
$data
[
'userid_updated'
]
=
Auth
::
user
()
->
id
;
$setting
->
update
(
$data
);
Alert
::
success
(
'Data berhasil diubah'
)
->
persistent
(
'Ok'
);
return
redirect
()
->
route
(
'settings.index'
);
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Setting $setting
* @return \Illuminate\Http\Response
*/
public
function
destroy
(
$id
)
{
//
}
}
app/Http/Requests/SettingRequest.php
0 → 100644
View file @
b296ec58
<?php
namespace
App\Http\Requests
;
use
Illuminate\Foundation\Http\FormRequest
;
class
SettingRequest
extends
FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public
function
authorize
()
{
return
true
;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public
function
rules
()
{
return
[
'name_setting'
=>
'required'
,
'value_setting'
=>
'required'
,
];
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public
function
messages
()
{
return
[
'required'
=>
'Form Input Ini Tidak Boleh Kosong / Harus Diisi'
,
];
}
}
resources/lang/en/label.php
View file @
b296ec58
...
...
@@ -7,6 +7,7 @@ return [
'update'
=>
'Update'
,
'delete'
=>
'Delete'
,
'save'
=>
'Save'
,
'cancel'
=>
'Cancel'
,
'number'
=>
'Num'
,
'name'
=>
'Name'
,
'status'
=>
'Status'
,
...
...
@@ -23,4 +24,5 @@ return [
'viewer'
=>
'Viewer'
,
'command'
=>
'Command'
,
'event_date'
=>
'Event Date'
,
'value'
=>
'Value'
,
];
resources/lang/id/label.php
View file @
b296ec58
...
...
@@ -7,6 +7,7 @@ return [
'update'
=>
'Update'
,
'delete'
=>
'Hapus'
,
'save'
=>
'Simpan'
,
'cancel'
=>
'Batal'
,
'number'
=>
'No'
,
'name'
=>
'Nama'
,
'status'
=>
'Status'
,
...
...
@@ -23,4 +24,5 @@ return [
'viewer'
=>
'Penonton'
,
'command'
=>
'Komentar'
,
'event_date'
=>
'Tanggal Kegiatan'
,
'value'
=>
'Nilai'
,
];
\ No newline at end of file
resources/views/webprofile/backend/categories/create.blade.php
View file @
b296ec58
...
...
@@ -5,7 +5,7 @@
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"
{
{
URL::to('dashboard')
}
}
"
>
Dashboard
</
a
></
li
>
<
li
><
a
href
=
"{{
url('dashboard')
}}"
>
Dashboard
</
a
></
li
>
<
li
class
="
active
">Tambah Kategori</li>
@stop
...
...
resources/views/webprofile/backend/categories/edit.blade.php
View file @
b296ec58
...
...
@@ -5,7 +5,7 @@
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"
{
{
URL::to('dashboard')
}
}
"
>
Dashboard
</
a
></
li
>
<
li
><
a
href
=
"{{
url('dashboard')
}}"
>
Dashboard
</
a
></
li
>
<
li
class
="
active
">Ubah Kategori</li>
@stop
...
...
resources/views/webprofile/backend/categories/index.blade.php
View file @
b296ec58
...
...
@@ -10,7 +10,7 @@
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"
{
{
URL::to('dashboard')
}
}
"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
><
a
href
=
"{{
url('dashboard')
}}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('feature.category')</li>
@stop
...
...
resources/views/webprofile/backend/informations/create.blade.php
View file @
b296ec58
...
...
@@ -14,7 +14,7 @@
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"
{
{
URL::to('dashboard')
}
}
"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
><
a
href
=
"{{
url('dashboard')
}}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('feature.create_information')</li>
@stop
...
...
resources/views/webprofile/backend/informations/edit.blade.php
View file @
b296ec58
...
...
@@ -14,7 +14,7 @@
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"
{
{
URL::to('dashboard')
}
}
"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
><
a
href
=
"{{
url('dashboard')
}}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('feature.create_information')</li>
@stop
...
...
resources/views/webprofile/backend/informations/index.blade.php
View file @
b296ec58
...
...
@@ -10,7 +10,7 @@
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"
{
{
URL::to('dashboard')
}
}
"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
><
a
href
=
"{{
url('dashboard')
}}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('feature.information')</li>
@stop
...
...
resources/views/webprofile/backend/layouts/navigations/admin.blade.php
View file @
b296ec58
...
...
@@ -42,5 +42,5 @@
<a
href=
"{{ url('webprofile/layouts') }}"
><span
class=
"fa fa-tasks"
></span>
<span
class=
"xn-text"
>
@lang('feature.layout')
</span></a>
</li>
<li>
<a
href=
"{{ url('webprofile/setting') }}"
><span
class=
"fa fa-gears"
></span><span
class=
"xn-text"
>
@lang('feature.setting')
</span></a>
<a
href=
"{{ url('webprofile/setting
s
') }}"
><span
class=
"fa fa-gears"
></span><span
class=
"xn-text"
>
@lang('feature.setting')
</span></a>
</li>
resources/views/webprofile/backend/pages/create.blade.php
View file @
b296ec58
...
...
@@ -14,7 +14,7 @@
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"
{
{
URL::to('dashboard')
}
}
"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
><
a
href
=
"{{
url('dashboard')
}}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('feature.create_page')</li>
@stop
...
...
resources/views/webprofile/backend/pages/edit.blade.php
View file @
b296ec58
...
...
@@ -14,7 +14,7 @@
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"
{
{
URL::to('dashboard')
}
}
"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
><
a
href
=
"{{
url('dashboard')
}}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('feature.create_page')</li>
@stop
...
...
resources/views/webprofile/backend/pages/index.blade.php
View file @
b296ec58
...
...
@@ -10,7 +10,7 @@
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"
{
{
URL::to('dashboard')
}
}
"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
><
a
href
=
"{{
url('dashboard')
}}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('feature.page')</li>
@stop
...
...
resources/views/webprofile/backend/posts/create.blade.php
View file @
b296ec58
...
...
@@ -14,7 +14,7 @@
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"
{
{
URL::to('dashboard')
}
}
"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
><
a
href
=
"{{
url('dashboard')
}}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('feature.create_post')</li>
@stop
...
...
resources/views/webprofile/backend/posts/edit.blade.php
View file @
b296ec58
...
...
@@ -14,7 +14,7 @@
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"
{
{
URL::to('dashboard')
}
}
"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
><
a
href
=
"{{
url('dashboard')
}}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('feature.create_post')</li>
@stop
...
...
resources/views/webprofile/backend/posts/index.blade.php
View file @
b296ec58
...
...
@@ -10,7 +10,7 @@
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"
{
{
URL::to('dashboard')
}
}
"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
><
a
href
=
"{{
url('dashboard')
}}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('feature.post')</li>
@stop
...
...
resources/views/webprofile/backend/setting/create.blade.php
0 → 100644
View file @
b296ec58
@
extends
(
'webprofile.backend.layouts.master'
)
@
section
(
'title'
)
{{
$title
}}
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"{{ url('dashboard') }}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('feature.create_setting')</li>
@stop
@section('content')
{!! Form::open(array('url' => route('settings.store'), 'method' => 'POST', 'id' => 'setting', 'class' => 'form-horizontal')) !!}
{!! csrf_field() !!}
<!-- page start-->
<div class="
row
">
<div class="
col
-
md
-
12
">
<div class="
panel
panel
-
default
">
<div class="
panel
-
heading
">
<h3 class="
panel
-
title
"><strong>@lang('label.create')</strong> @lang('feature.setting')</h3>
</div>
<div class="
panel
-
body
">
<div class="
row
">
<div class="
col
-
md
-
12
">
<div class="
form
-
group
@
if
(
$errors
->
has
(
'name_setting'
))
has
-
error
@
endif
">
<label class="
col
-
md
-
2
control
-
label
">@lang('label.name') @lang('feature.setting')</label>
<div class="
col
-
md
-
10
">
{{ Form::text('name_setting', old('name_setting'), array('class' => 'form-control')) }}
@if (
$errors->has
('name_setting'))
<label id="
login
-
error
" class="
error
" for="
login
">
{
{$errors->first('name_setting')}
}
</label>
@endif
</div>
</div>
<div class="
form
-
group
@
if
(
$errors
->
has
(
'value_setting'
))
has
-
error
@
endif
">
<label class="
col
-
md
-
2
control
-
label
">@lang('label.value') @lang('feature.setting')</label>
<div class="
col
-
md
-
10
">
{{ Form::text('value_setting', old('value_setting'), array('class' => 'form-control')) }}
@if (
$errors->has
('value_setting'))
<label id="
login
-
error
" class="
error
" for="
login
">
{
{$errors->first('value_setting')}
}
</label>
@endif
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="
col
-
md
-
12
">
<div class="
panel
panel
-
default
">
<div class="
panel
-
footer
">
<a href="
{{
url
(
'settings'
)
}}
" class="
btn
btn
-
default
pull
-
right
">@lang('label.cancel')</a>
<button class="
btn
btn
-
info
pull
-
right
">@lang('label.save')</button>
</div>
</div>
</div>
</div>
{!! Form::close() !!}
<!-- page end-->
@stop
@section('script')
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-datepicker.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-timepicker.min.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-file-input.js') !!}
@stop
resources/views/webprofile/backend/setting/edit.blade.php
0 → 100644
View file @
b296ec58
@
extends
(
'webprofile.backend.layouts.master'
)
@
section
(
'title'
)
{{
$title
}}
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"{{ url('dashboard') }}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('feature.edit_setting')</li>
@stop
@section('content')
{!! Form::model(
$data
, ['route' => ['settings.update',
$data->id
], 'method'=>'patch', 'class'=>'form-horizontal']) !!}
{!! csrf_field() !!}
<!-- page start-->
<div class="
row
">
<div class="
col
-
md
-
12
">
<div class="
panel
panel
-
default
">
<div class="
panel
-
heading
">
<h3 class="
panel
-
title
"><strong>@lang('label.edit')</strong> @lang('feature.setting')</h3>
</div>
<div class="
panel
-
body
">
<div class="
row
">
<div class="
col
-
md
-
12
">
<div class="
form
-
group
@
if
(
$errors
->
has
(
'name_setting'
))
has
-
error
@
endif
">
<label class="
col
-
md
-
2
control
-
label
">@lang('label.name') @lang('feature.setting')</label>
<div class="
col
-
md
-
10
">
{{ Form::text('name_setting', old('name_setting'), array('class' => 'form-control', 'readonly', 'style' => 'color: black')) }}
@if (
$errors->has
('name_setting'))
<label id="
login
-
error
" class="
error
" for="
login
">
{
{$errors->first('name_setting')}
}
</label>
@endif
</div>
</div>
<div class="
form
-
group
@
if
(
$errors
->
has
(
'value_setting'
))
has
-
error
@
endif
">
<label class="
col
-
md
-
2
control
-
label
">@lang('label.value') @lang('feature.setting')</label>
<div class="
col
-
md
-
10
">
{{ Form::text('value_setting', old('value_setting'), array('class' => 'form-control')) }}
@if (
$errors->has
('value_setting'))
<label id="
login
-
error
" class="
error
" for="
login
">
{
{$errors->first('value_setting')}
}
</label>
@endif
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="
col
-
md
-
12
">
<div class="
panel
panel
-
default
">
<div class="
panel
-
footer
">
<a href="
{{
url
(
'settings'
)
}}
" class="
btn
btn
-
default
pull
-
right
">@lang('label.cancel')</a>
<button class="
btn
btn
-
info
pull
-
right
">@lang('label.save')</button>
</div>
</div>
</div>
</div>
{!! Form::close() !!}
<!-- page end-->
@stop
@section('script')
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-datepicker.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-timepicker.min.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-file-input.js') !!}
@stop
resources/views/webprofile/backend/setting/index.blade.php
0 → 100644
View file @
b296ec58
@
extends
(
'webprofile.backend.layouts.master'
)
@
section
(
'title'
)
{{
$title
}}
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"{{ url('dashboard') }}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('feature.setting')</li>
@stop
@section('content')
<!-- page start-->
<div class="
row
">
<div class="
col
-
lg
-
12
">
<!-- START DEFAULT DATATABLE -->
<div class="
panel
panel
-
default
">
<div class="
panel
-
heading
">
<h3 class="
panel
-
title
">{!!
$title
!!}</h3>
{{-- <a class="
btn
btn
-
info
" href="
{{
URL
::
to
(
'webprofile/settings/create'
)}}
" style="
margin
:
0
cm
0
px
0
cm
10
px
;
">@lang('label.create')</a> --}}
<ul class="
panel
-
controls
">
<li><a href="
#" class="panel-collapse"><span class="fa fa-angle-down"></span></a></li>
</
ul
>
</
div
>
<
div
class
="
panel
-
body
">
<table class="
table
datatable
table
-
hover
" id="
berita
">
<thead>
<tr>
<th width="
7
%
">@lang('label.number')</th>
<th width="
33
%
">@lang('label.name')</th>
<th width="
30
%
">@lang('label.value')</th>
<th align="
center
" width="
15
%
">@lang('label.action')</th>
</tr>
</thead>
<tbody>
<?php
$no
= 1;?>
@foreach(
$data
as
$value
)
<tr style="
cursor
:
pointer
">
<td align="
center
"><?php echo
$no
; ?></td>
<td>{!!
$value->name_setting
!!}</td>
<td>{!!
$value->value_setting
!!}</td>
<td style="
text
-
align
:
center
;
">
<a href="
{{
route
(
'settings.edit'
,
[
'data'
=>
Crypt
::
encrypt
(
$value
->
id
)])
}}
" class="
btn
btn
-
warning
btn
-
xs
"><i class="
fa
fa
-
pencil
"></i></a>
</td>
<?php
$no
++;?>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<!-- END DEFAULT DATATABLE -->
</div>
</div>
<!-- page end-->
@stop
@section('script')
<script src="
{
!!
asset
(
'backend/js/datatables.net/js/jquery.dataTables.min.js'
)
!!
}
"></script>
@stop
routes/webprofile/backend.php
View file @
b296ec58
...
...
@@ -6,6 +6,7 @@ Route::group(['middleware' => 'auth'], function () {
Route
::
resource
(
'posts'
,
'PostController'
);
Route
::
resource
(
'pages'
,
'PageController'
);
Route
::
resource
(
'informations'
,
'InformationController'
);
Route
::
resource
(
'settings'
,
'SettingController'
);
});
// });
});
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