@extends('admin.master')

@section('title')
    Edit Video
@endsection

@section('content')
    <div class="card card-custom" id="kt_card_4">
        <div class="card-header">
            <h3 class="card-title">
                Edit Video
            </h3>
        </div>
        <form class="form" action="{{ route('videogalleries.update', $videogallery->id) }}" method="POST" enctype="multipart/form-data">
            @csrf
            @method('PUT')
            <div class="card-body">
                <div class="form-group row">
                    <div class="col-lg-12">
                        <label>Video Link: <span class="text-danger">*</span></label>
                        <input type="text" name="link" class="form-control mb-2" placeholder="Enter video link here" value="{{ old('link', $videogallery->link) }}" required />
                        @error('link')
                            <span class="text-danger">{{ $message }}</span>
                        @enderror
                    </div>
                </div>

            </div>

            <div class="card-footer">
                <div class="row">
                    <div class="col-lg-12 text-center">
                        <button type="submit" class="btn btn-success mr-2">Update Video</button>
                        <a href="{{ route('videogalleries.index') }}" class="btn btn-secondary">Cancel</a>
                    </div>
                </div>
            </div>
        </form>
    </div>
@endsection
