Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery dropdown options in laravel

@section('scripts')
    <script type="text/javascript">
        $("#country").change(function(){
            $.ajax({
                url: "{{ route('admin.cities.get_by_country') }}?country_id=" + $(this).val(),
                method: 'GET',
                success: function(data) {
                    $('#city').html(data.html);
                }
            });
        });
    </script>
@endsection
Source by blog.quickadminpanel.com #
 
PREVIOUS NEXT
Tagged: #jquery #dropdown #options #laravel
ADD COMMENT
Topic
Name
2+7 =