🤩 File Manager - Mr.X
PHP:
8.3.33
Server:
Apache
OS:
Linux 5.14.0-611.49.1.el9_7.x86_64
User:
websparkit
Navigate
Upload:
Upload
New File
New Folder
Editing:c3912738ba8102fb92a4f86bf0c42bd4.php
<section> <header> <h2 class="text-lg font-medium text-navy"> <?php echo e(__('Profile Photo')); ?> </h2> <p class="mt-1 text-sm text-gray-600"> <?php echo e(__('Upload or update your profile picture.')); ?> </p> </header> <div class="mt-6 flex items-center gap-6"> <div class="shrink-0"> <img id="profile-preview" class="h-24 w-24 rounded-full object-cover ring-2 ring-orange/30" src="<?php echo e(Auth::user()->profile_photo_url); ?>" alt="<?php echo e(Auth::user()->name); ?>"> </div> <form id="photo-form" action="<?php echo e(route('profile.photo.update')); ?>" method="POST" enctype="multipart/form-data" class="flex-1"> <?php echo csrf_field(); ?> <label class="block"> <span class="sr-only">Choose photo</span> <input type="file" name="photo" accept="image/jpeg,image/png,image/webp" onchange="previewAndUpload(this)" class="block w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-semibold file:bg-orange file:text-white hover:file:bg-orange-dark transition cursor-pointer"> </label> <p class="text-xs text-gray-400 mt-2">JPG, PNG or WebP. Max 2MB.</p> </form> <?php if(Auth::user()->profile_photo_path): ?> <form action="<?php echo e(route('profile.photo.remove')); ?>" method="POST" onsubmit="return confirm('Remove profile photo?')"> <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?> <button type="submit" class="text-sm text-red-600 hover:text-red-800 font-medium">Remove</button> </form> <?php endif; ?> </div> </section> <script> function previewAndUpload(input) { if (input.files && input.files[0]) { const reader = new FileReader(); reader.onload = e => { document.getElementById('profile-preview').src = e.target.result; }; reader.readAsDataURL(input.files[0]); document.getElementById('photo-form').submit(); } } </script> <?php /**PATH /home/websparkit/public_html/clint.websparkit.com/laravel/resources/views/profile/partials/update-profile-photo-form.blade.php ENDPATH**/ ?>
Save Changes
Cancel
Create New File
Create New Folder