lk.zachem.info/resources/views/user/profile.blade.php

97 lines
4.8 KiB
PHP

@extends('layouts.app')
@section('content')
<div style="max-width:700px">
<form method="POST" action="">
@csrf
<div class="mb-3">
<img src="../../images/icons/user.png" class="img-fluid align-middle" style="height: 100px;">
</div>
<div class="row">
<div class="col">
<div class="form-floating mb-3">
<input id="user.firstName" name="user[firstName]"
value="{{ Auth::user()->getPartialsName()['secondName'] }} {{ Auth::user()->getPartialsName()['familyName'] }}"
class="form-control rounded-4 bg-white @error('user.firstName') is-invalid @enderror"
name="user.firstName" required placeholder="Имя">
<label for="user.firstName">Имя</label>
@error('user.firstName')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="col">
<div class="form-floating mb-3">
<input id="user.secondName" name="user[secondName]"
value="{{ Auth::user()->getPartialsName()['firstName'] }}"
class="form-control rounded-4 bg-white @error('user.secondName') is-invalid @enderror"
name="user.secondName" required placeholder="Фамилия">
<label for="user.secondName">Фамилия</label>
@error('user.secondName')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="form-floating mb-3">
<input id="user.email" name="user[email]" value="{{ Auth::user()->email }}"
class="form-control rounded-4 bg-white @error('user.email') is-invalid @enderror"
name="user.email" required placeholder="Электронная почта">
<label for="user.email">Электронная почта</label>
@error('user.email')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="col">
<div class="form-floating mb-3">
<input id="user.phone" name="user[phone]" value="{{ Auth::user()->phone }}"
class="form-control rounded-4 bg-white @error('user.phone') is-invalid @enderror"
name="user.phone" required placeholder="Телефон">
<label for="user.phone">Телефон</label>
@error('user.phone')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
</div>
<div class="form-floating">
<input id="details.address" name="details[address]" value=""
class="form-control rounded-4 bg-white @error('details.address') is-invalid @enderror" required
placeholder="Телеграм ник">
<label for="details.address">Телеграм ник</label>
@error('details.address')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="my-3 d-flex">
<div class="me-2">Мои права: </div>
<div class="hstack gap-2">
@foreach (auth()->user()->roles as $role)
<div class="badge bg-secondary">
{{ __($role->name) }}
</div>
@endforeach
</div>
</div>
<button class="btn rounded-4 text-light fw-bold fs-5 w-100 py-3" style="background-color: #20184d;">
Сохранить изменения
</button>
</form>
</div>
@endsection