One Hat Cyber Team
Your IP :
10.30.1.1
Server IP :
103.148.201.5
Server :
Linux web-olt 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
Server Software :
Apache/2.4.52 (Ubuntu)
PHP Version :
8.1.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
html
/
Compro-ISP
/
resources
/
views
/
v
/
client
/
Edit File:
edit.blade.php
@extends('layouts.dashboard') @section('content') <section id="multiple-column-form"> <div class="row match-height"> <div class="col-12"> <div class="card"> <div class="card-header"> <h4 class="card-title">Edit Data Home</h4> </div> <div class="card-content"> <div class="card-body"> <form action="{{ route('homepages.home.update', $data->id) }}" method="POST" enctype="multipart/form-data"> @csrf @method('PUT') <div class="form-body"> <div class="row"> <div class="col-md-4"> <label>Description</label> </div> <div class="col-md-8 form-group"> <input type="text" id="name" class="form-control" name="name" value="{{ $data->name }}"> </div> <div class="col-md-4"> <label>Current Image</label> </div> <div class="col-md-8 form-group"> @if ($data->images) <img src="{{ asset('storage/images/' . $data->images) }}" alt="Current Image" width="150" height="150" style="object-fit: cover; border: 1px solid #ddd; margin-bottom: 10px;"> @else <p>No image available</p> @endif </div> <div class="col-md-4"> <label>Change Image (optional)</label> </div> <div class="col-md-8 form-group"> <input class="form-control" type="file" id="images" name="images" accept="image/*" onchange="previewImage()"> <small class="form-text text-muted">Leave empty if you don't want to change the image.</small> </div> <div class="col-md-4"> <label>Preview Image</label> </div> <!-- Preview of new image --> <div class="col-md-8 offset-md-4 form-group" id="image-preview-container" style="display:none;"> <img id="image-preview" src="" alt="Image Preview" width="150" height="150" style="object-fit: cover; border: 1px solid #ddd; margin-bottom: 10px;"> </div> <div class="col-sm-12 d-flex justify-content-end"> <button type="submit" class="btn btn-primary me-1 mb-1">Submit</button> </div> </div> </div> </form> </div> </div> </div> </div> </div> </section> <script> // Preview image before upload function previewImage() { const file = document.getElementById('images').files[0]; const reader = new FileReader(); reader.onloadend = function() { const preview = document.getElementById('image-preview'); const previewContainer = document.getElementById('image-preview-container'); preview.src = reader.result; previewContainer.style.display = 'block'; // Show the preview image } if (file) { reader.readAsDataURL(file); } } </script> @endsection
Simpan