<x-backend.model :id="'edit-model'" class="lg:max-w-2xl" :button="'Submit'" :form_id="'company-edit'" :action="route('company.store')"
    :method="__('post')">
    @csrf
    @method('put')
    <div class="p-4 sm:p-10 overflow-y-auto  space-y-2">
        <x-backend.input-label :value="'Question'" for="question" />
        <input type="file" name="image">
    </div>
</x-backend.model>


<script>
    $(document).on('click', '#update', function() {
        let data = $(this).attr('data');
        data = JSON.parse(data);

        let route = "{{ route('company.update', ':id') }}".replace(':id', data.id);
        $('#company-edit').attr('action', route)
    })
</script>
