Skip to content

Commit

Permalink
Show/hide brand on footer
Browse files Browse the repository at this point in the history
  • Loading branch information
ajifatur committed Aug 28, 2022
1 parent 6ab537a commit 67cfcdd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
17 changes: 17 additions & 0 deletions resources/views/admin/setting/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,23 @@
</div>
</div>
<hr>
<div class="row mb-3">
<label class="col-lg-2 col-md-3 col-form-label">Tampilkan Brand <span class="text-danger">*</span></label>
<div class="col-lg-10 col-md-9">
<div class="form-check">
<input class="form-check-input" type="radio" name="setting[show_brand]" id="show_brand-1" value="1" {{ setting('show_brand') == '1' ? 'checked' : '' }}>
<label class="form-check-label" for="show_brand-1">Ya</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="setting[show_brand]" id="show_brand-0" value="0" {{ setting('show_brand') == '0' ? 'checked' : '' }}>
<label class="form-check-label" for="show_brand-0">Tidak</label>
</div>
@if($errors->has('setting.show_brand'))
<div class="small text-danger">{{ $errors->first('setting.show_brand') }}</div>
@endif
</div>
</div>
<hr>
<div class="row">
<div class="col-lg-2 col-md-3"></div>
<div class="col-lg-10 col-md-9">
Expand Down
4 changes: 3 additions & 1 deletion resources/views/layouts/admin/_footer.blade.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@

<footer class="footer">
<div class="container-fluid">
<div class="d-sm-flex justify-content-between text-center">
<div class="d-sm-flex {{ setting('show_brand') == 1 ? 'justify-content-between' : 'justify-content-center' }} text-center">
<div class="text-muted">
<a class="text-muted" href="/" target="_blank"><strong>{{ config('app.name') }}</strong></a> &copy; {{ date('Y') }}
</div>
@if(setting('show_brand') == 1)
<div class="text-muted">
Powered by <a href="https://spandiv.xyz" target="_blank">Spandiv Digital</a>
</div>
@endif
</div>
</div>
</footer>
1 change: 1 addition & 0 deletions src/Seeders/SettingSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public function run()
['code' => 'google_maps', 'content' => ''],
['code' => 'google_tag_manager', 'content' => ''],
['code' => 'theme', 'content' => 'default'],
['code' => 'show_brand', 'content' => '1'],
];

foreach($settings as $setting) {
Expand Down

0 comments on commit 67cfcdd

Please sign in to comment.