관리-도구
편집 파일: websit.blade.php
@extends('layouts.app') @section('content') <div class="main-panel"> <div class="content-wrapper"> <style> .site-card { border: 1px solid #c1c1c1; border-radius: 15px; background: #fff; } .site-card small { color: #6f42c1; font-weight: 600; } </style> <div class="row"> @foreach($websites as $site) <div class="col-md-9 my-3"> <div class="site-card p-3"> <div class="d-flex justify-content-between"> <div> <small>Meta Name</small> <p>{{ $site->m_name }}</p> </div> <button class="btn btn-outline-primary" data-toggle="modal" data-target="#edit{{ $site->w_id }}"> <i class="fa fa-edit"></i> </button> </div> <hr> <small>Meta Keyword</small> <p>{{ $site->m_key }}</p> <hr> <small>Title</small> <p>{{ $site->m_titile }}</p> <hr> <small>Meta Description</small> <p>{{ $site->m_discription }}</p> <hr> <small>All Right Reserved</small> <p>{{ $site->m_all }}</p> <hr> <small>Logo</small> <img src="{{ asset('storage/'.$site->m_logo) }}" width="80"> <hr> <small>Favicon</small> <img src="{{ asset('storage/'.$site->m_favicon) }}" width="40"> </div> </div> <!-- Update Modal --> <!-- Update Modal --> <div class="modal fade" id="edit{{ $site->w_id }}"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content"> <div class="modal-header"> <h5>Edit Website</h5> <button class="close" data-dismiss="modal">×</button> </div> <div class="modal-body"> <form method="POST" action="{{ route('admin-websit.update', $site->w_id) }}" enctype="multipart/form-data"> @csrf @method('PUT') <!-- Meta Name --> <label>Meta Name</label> <input class="form-control mb-3" name="m_name" value="{{ $site->m_name }}"> <!-- Meta Keyword --> <label>Meta Keyword</label> <input class="form-control mb-3" name="m_key" value="{{ $site->m_key }}"> <!-- Meta Description --> <label>Meta Description</label> <textarea class="form-control mb-3" name="m_discription" rows="3">{{ $site->m_discription }}</textarea> <!-- Title --> <label>Title</label> <input class="form-control mb-3" name="m_titile" value="{{ $site->m_titile }}"> <!-- Logo --> <label>Logo</label> <input type="file" class="form-control mb-2" name="m_logo"> @if($site->m_logo) <img src="{{ asset('storage/'.$site->m_logo) }}" width="80" class="mb-3"> @endif <br> <!-- Favicon --> <label>Favicon</label> <input type="file" class="form-control mb-2" name="m_favicon"> @if($site->m_favicon) <img src="{{ asset('storage/'.$site->m_favicon) }}" width="40" class="mb-3"> @endif <br> <!-- All Rights Reserved --> <label>All Rights Reserved</label> <input class="form-control mb-4" name="m_all" value="{{ $site->m_all }}"> <button class="btn btn-primary w-100">Update</button> </form> </div> </div> </div> </div> @endforeach </div> </div> </div> @endsection