@extends('layouts.master') @section('title') @lang('Title') @endsection @section('css') @endsection @section('content')
Department
@if ($message = Session::has('success'))
{{ $message }}
@endif
@method('PUT') {{ csrf_field() }} @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@if ($errors->has('name'))
{{ $errors->first('name') }}
@endif
@if ($errors->has('description'))
{{ $errors->first('description') }}
@endif
@if ($errors->has('meta_title'))
{{ $errors->first('meta_title') }}
@endif

Treatments and Procedures
@php $treatment_id_array=array(); @endphp @foreach($department->treatments as $index => $treatment) @php $treatment_id_array[$treatment->treatment_id]=$treatment->treatment_id; @endphp
Personalized Treatment Plan #{{ $index + 1 }}
@endforeach @php $department_treatments=department_treatments(); @endphp @foreach($department_treatments as $key => $label) @if (!array_key_exists($key, $treatment_id_array))
{{$label }}
@endif @endforeach

@if ($errors->has('meta_description'))
{{ $errors->first('meta_description') }}
@endif
@if(!empty($department->filename)) @if(in_array(pathinfo($department->filename, PATHINFO_EXTENSION), ['jpg', 'jpeg', 'png', 'gif'])) filename")}}" alt="Example Image" style="max-width: 25%; height: auto;"> @else filename")}}" download>Download {{ basename($department->filename) }} @endif @endif @if ($errors->has('file'))
{{ $errors->first('file') }}
@endif
@php // $file_array=array(); $fileData = []; // Initialize as an array before appending foreach($resgallery as $gallery){ // $file_array[]=$gallery->filename; if (Storage::disk('public')->exists('uploads/gallery/' . $gallery->filename)) { $fileData[] = [ 'file_name' => $gallery->filename, 'file_size' => Storage::disk('public')->size('uploads/gallery/' . $gallery->filename), 'file_url' => asset('storage/uploads/gallery/' . $gallery->filename) ]; } else { // Handle missing file case Log::error('File not found: ' . $gallery->filename); } } // $fileName = json_encode($file_array); @endphp
@endsection @section('script') @include('admin.dropzone-single-edit') @endsection