いいね一覧の公開設定を追加
This commit is contained in:
parent
c20a8066c9
commit
ddac533539
@ -46,11 +46,12 @@ class SettingController extends Controller
|
|||||||
|
|
||||||
public function updatePrivacy(Request $request)
|
public function updatePrivacy(Request $request)
|
||||||
{
|
{
|
||||||
$inputs = $request->all(['is_protected', 'accept_analytics']);
|
$inputs = $request->all(['is_protected', 'accept_analytics', 'private_likes']);
|
||||||
|
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
$user->is_protected = $inputs['is_protected'] ?? false;
|
$user->is_protected = $inputs['is_protected'] ?? false;
|
||||||
$user->accept_analytics = $inputs['accept_analytics'] ?? false;
|
$user->accept_analytics = $inputs['accept_analytics'] ?? false;
|
||||||
|
$user->private_likes = $inputs['private_likes'] ?? false;
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
return redirect()->route('setting.privacy')->with('status', 'プライバシー設定を更新しました。');
|
return redirect()->route('setting.privacy')->with('status', 'プライバシー設定を更新しました。');
|
||||||
|
@ -11,6 +11,11 @@
|
|||||||
<div class="custom-control custom-checkbox mb-2">
|
<div class="custom-control custom-checkbox mb-2">
|
||||||
<input id="protected" name="is_protected" class="custom-control-input" type="checkbox" {{ (old('is_protected') ?? Auth::user()->is_protected ) ? 'checked' : '' }}>
|
<input id="protected" name="is_protected" class="custom-control-input" type="checkbox" {{ (old('is_protected') ?? Auth::user()->is_protected ) ? 'checked' : '' }}>
|
||||||
<label class="custom-control-label" for="protected">全てのチェックイン履歴を非公開にする</label>
|
<label class="custom-control-label" for="protected">全てのチェックイン履歴を非公開にする</label>
|
||||||
|
<small class="form-text text-muted">プロフィール情報を除いて、全ての情報が非公開になります。</small>
|
||||||
|
</div>
|
||||||
|
<div class="custom-control custom-checkbox mb-2">
|
||||||
|
<input id="private-likes" name="private_likes" class="custom-control-input" type="checkbox" {{ (old('private_likes') ?? Auth::user()->private_likes ) ? 'checked' : '' }}>
|
||||||
|
<label class="custom-control-label" for="private-likes">いいねしたチェックイン一覧を非公開にする</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="custom-control custom-checkbox">
|
<div class="custom-control custom-checkbox">
|
||||||
<input id="accept-analytics" name="accept_analytics" class="custom-control-input" type="checkbox" {{ (old('accept_analytics') ?? Auth::user()->accept_analytics ) ? 'checked' : '' }}>
|
<input id="accept-analytics" name="accept_analytics" class="custom-control-input" type="checkbox" {{ (old('accept_analytics') ?? Auth::user()->accept_analytics ) ? 'checked' : '' }}>
|
||||||
|
Loading…
Reference in New Issue
Block a user