@extends('layouts.admin') @section('content') @php $readonly=''; @endphp @if($action=='View') @php $readonly='readonly'; @endphp @endif

{{ __($title) }}

@if($action == 'Edit')
{{ method_field('PUT') }} @else @endif @csrf
@if(isset($record)) @php $title=$record->title; @endphp @elseif(old('title')) @php $title=old('title'); @endphp @else @php $title=''; @endphp @endif @error('title') {{ $message }} @enderror
@if(isset($record)) @php $unit_id=$record->unit_id; @endphp @elseif(old('unit_id')) @php $unit_id=old('unit_id'); @endphp @else @php $unit_id=0; @endphp @endif @error('unit_id') {{ $message }} @enderror
@if(isset($record->active)) @php $active = $record->active; @endphp @else @php $active = 1; @endphp @endif
@if(isset($record->description)) @php $description = $record->description; @endphp @else @php $description = ''; @endphp @endif
@if(isset($record->photo) && $record->photo != '' && ($action=='Edit' || $action=='View')) @php $photo = $record->photo; @endphp @else @php $photo = ''; @endphp @endif
@if($photo!="") @endif
@error('photo') {{ $message }} @enderror
@if($action!='View') @endif {!! ($action!='View') ? 'Cancel' : 'Back' !!}
@endsection @push('scripts') @endpush