@extends('layouts.sidebar') @section('content')

{{__('messages.Edit User')}}

@foreach($user as $user)
@csrf
@if(file_exists(base_path(findAvatar($user->id)))) @else @endif @if(file_exists(base_path(findAvatar($user->id))))
{{__('messages.Delete')}}@endif @if($_SERVER['QUERY_STRING'] === 'delete' and File::exists(base_path(findAvatar($user->id))))@php File::delete(base_path(findAvatar($user->id))); header("Location: ".url()->current()); die(); @endphp @endif

@if(!file_exists(base_path('assets/img/background-img/'.findBackground($user->id))))

{{__('messages.No image selected')}}

@endif @if(file_exists(base_path('assets/img/background-img/'.findBackground($user->id))))
{{__('messages.Delete')}}@endif @if($_SERVER['QUERY_STRING'] === 'deleteB' and File::exists(base_path('assets/img/background-img/'.findBackground($user->id))))@php File::delete(base_path('assets/img/background-img/'.findBackground($user->id))); header("Location: ".url()->current()); die(); @endphp @endif

{{ url('') }}/@
@endforeach
@endsection