2021-04-16 01:00:00 +02:00
|
|
|
@extends('layouts.sidebar')
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
|
|
|
<h2 class="mb-4"><i class="bi bi-person"> Edit User</i></h2>
|
|
|
|
@foreach($user as $user)
|
|
|
|
<form action="{{ route('editUser', $user->id) }}" enctype="multipart/form-data" method="post">
|
|
|
|
@csrf
|
|
|
|
<div class="form-group col-lg-8">
|
|
|
|
<label>Name</label>
|
|
|
|
<input type="text" class="form-control" name="name" value="{{ $user->name }}">
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-lg-8">
|
|
|
|
<label>Email</label>
|
|
|
|
<input type="email" class="form-control" name="email" value="{{ $user->email }}">
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-lg-8">
|
|
|
|
<label>Password</label>
|
2022-03-28 19:54:17 +02:00
|
|
|
<input type="password" class="form-control" name="password" placeholder="Leave empty for no change">
|
2021-04-16 01:00:00 +02:00
|
|
|
</div>
|
2021-07-06 10:50:07 +02:00
|
|
|
|
2021-04-16 01:00:00 +02:00
|
|
|
<div class="form-group col-lg-8">
|
|
|
|
<label>Logo</label>
|
|
|
|
<input type="file" class="form-control-file" name="image">
|
|
|
|
</div>
|
2021-07-06 10:50:07 +02:00
|
|
|
|
2021-04-16 01:00:00 +02:00
|
|
|
<div class="form-group col-lg-8">
|
2022-02-14 12:56:03 +01:00
|
|
|
@if(file_exists(base_path("img/$user->littlelink_name" . ".png" )))
|
2022-05-15 11:43:11 +02:00
|
|
|
<img src="{{ asset("img/$user->littlelink_name" . ".png") }}" srcset="{{ asset("img/$user->littlelink_name" . "@2x.png 2x") }}" width="128px" height="128px" style="object-fit: cover;">
|
2022-02-20 15:42:45 +01:00
|
|
|
@elseif(file_exists(base_path("littlelink/images/avatar.png" )))
|
2022-05-15 11:43:11 +02:00
|
|
|
<img class="rounded-avatar" src="{{ asset('littlelink/images/avatar.png') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="128px" height="128px" style="object-fit: cover;">
|
2021-07-06 10:50:07 +02:00
|
|
|
@else
|
2022-05-15 11:43:11 +02:00
|
|
|
<img src="{{ asset('littlelink/images/logo.svg') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="128px" height="128px" style="object-fit: cover;">
|
2021-07-06 10:50:07 +02:00
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!--<div class="form-group col-lg-8">
|
2021-04-16 01:00:00 +02:00
|
|
|
<label>Littlelink name </label>
|
|
|
|
<input type="text" class="form-control" name="littlelink_name" value="{{ $user->littlelink_name }}">
|
2021-07-06 10:50:07 +02:00
|
|
|
</div>-->
|
|
|
|
|
|
|
|
<div class="form-group col-lg-8">
|
|
|
|
<label>Page URL</label>
|
|
|
|
<div class="input-group">
|
|
|
|
<div class="input-group-prepend">
|
2022-02-27 19:33:19 +01:00
|
|
|
<div class="input-group-text">{{ url('') }}/@</div>
|
2021-07-06 10:50:07 +02:00
|
|
|
</div>
|
|
|
|
<input type="text" class="form-control" name="littlelink_name" value="{{ $user->littlelink_name }}">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-04-16 01:00:00 +02:00
|
|
|
<div class="form-group col-lg-8">
|
2021-07-06 10:50:07 +02:00
|
|
|
<label> Page description</label>
|
2021-04-16 01:00:00 +02:00
|
|
|
<textarea class="form-control" name="littlelink_description" rows="3">{{ $user->littlelink_description }}</textarea>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-lg-8">
|
|
|
|
<label for="exampleFormControlSelect1">Role</label>
|
|
|
|
<select class="form-control" name="role">
|
2022-03-28 19:54:17 +02:00
|
|
|
<option <?= ($user->role === strtolower('user')) ? 'selected' : '' ?>>user</option>
|
|
|
|
<option <?= ($user->role === strtolower('vip')) ? 'selected' : '' ?>>vip</option>
|
|
|
|
<option <?= ($user->role === strtolower('admin')) ? 'selected' : '' ?>>admin</option>
|
2021-04-16 01:00:00 +02:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
@endforeach
|
|
|
|
<button type="submit" class="mt-3 ml-3 btn btn-info">Submit</button>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
@endsection
|