<div class="row">
    <div class="col-md-12">
        <p>
            <input type="text" id="query" class="form-control" placeholder="Enter something to search..." value="{{ Request::input('query') }}">
        </p>
    </div>
</div>

@push('scripts')
<script>

    "use strict";

    $(function () {

        /**
         * search request
         */
        $('#query').keypress(function (e) {

            if (e.which === 13) {

                $.post('/admin-search', {query: this.value, route_path: '{{ $route_path }}', current_path: '/{{ \Request::path() }}'}, function (data) {

                    table_container.html(data);
                });
            }
        });
    });
</script>
@endpush