@extends('admin.layouts.master') @section('title') Edit Media @endsection @section('css') @endsection @section('content') @if ($errors->any()) @foreach ($errors->all() as $error) {{-- {{ $error }} --}} @endforeach @endif Edit Media Home Medias Edit Media {{-- --}} Edit Media @csrf @method('PUT') Name @if ($errors->has('name')) {{ $errors->first('name') }} @endif Description {{ $media->description }} @if ($errors->has('description')) {{ $errors->first('description') }} @endif Image @if ($media->images && count($media->images) > 0) @foreach ($media->images as $image)     @endforeach @else -No Image Selected @endif @if (count($errors->get('images.*'))) @php $test = 1; @endphp @foreach ($errors->get('images.*') as $errors) @foreach ($errors as $error) @if ($test == 1) {{ $error }} @endif @php $test++; @endphp @endforeach @endforeach @endif Category @foreach ($categories as $category) category_id == $category->id) selected @endif>{{ $category->name }} @endforeach {{-- @if ($errors->has('category_id')) {{ $errors->first('category_id') }} @endif --}} Status is_active) checked @endif class="custom-control-input" id="customSwitch1" aria-describedby="IsActiveError" aria-invalid="true"> Select Media To Be Active Or Not {{-- @if ($errors->has('is_active')) {{ $errors->first('is_active') }} @endif --}} Update @endsection @section('scripts') @endsection