Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
f4851348
Commit
f4851348
authored
Oct 18, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show the settings values
parent
4477b3ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
SettingController.php
Http/Controllers/Admin/SettingController.php
+8
-1
fields.blade.php
Resources/views/admin/partials/fields.blade.php
+2
-2
No files found.
Http/Controllers/Admin/SettingController.php
View file @
f4851348
...
...
@@ -23,7 +23,14 @@ class SettingController extends AdminBaseController
public
function
index
()
{
return
View
::
make
(
'setting::admin.settings'
);
$rawSettings
=
$this
->
setting
->
all
();
$settings
=
[];
foreach
(
$rawSettings
as
$setting
)
{
$settings
[
$setting
->
name
]
=
$setting
;
}
return
View
::
make
(
'setting::admin.settings'
,
compact
(
'settings'
));
}
public
function
store
(
SettingRequest
$request
)
...
...
Resources/views/admin/partials/fields.blade.php
View file @
f4851348
<div
class=
'form-group{{ $errors->has("site-name[$lang]") ? '
has-error
'
:
''
}}'
>
{!! Form::label("site-name[$lang]", 'Site name:') !!}
{!! Form::text("site-name[$lang]", Input::old("site-name[$lang]"), ['class' => 'form-control', 'placeholder' => 'Site name']) !!}
{!! Form::text("site-name[$lang]", Input::old("site-name[$lang]"
, $settings['site-name']->translate($lang)->value
), ['class' => 'form-control', 'placeholder' => 'Site name']) !!}
{!! $errors->first("site-name[$lang]", '
<span
class=
"help-block"
>
:message
</span>
') !!}
</div>
<div
class=
'form-group{{ $errors->has("site-description[$lang]") ? '
has-error
'
:
''
}}'
>
{!! Form::label("site-description[$lang]", 'Site-description:') !!}
{!! Form::textarea("site-description[$lang]", Input::old("site-description[$lang]"), ['class' => 'form-control', 'placeholder' => 'Site description']) !!}
{!! Form::textarea("site-description[$lang]", Input::old("site-description[$lang]"
, $settings['site-description']->translate($lang)->value
), ['class' => 'form-control', 'placeholder' => 'Site description']) !!}
{!! $errors->first("site-description[$lang]", '
<span
class=
"help-block"
>
:message
</span>
') !!}
</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