Can't display data in input search of a view of laravel 5.2
Please how can tel me what is the solution of this pb:
my index.blade.php is:
- @extends('layouts.app')
- @section('content')
- <div class="container">
- <div class="row">
- <div class="col-md-10 col-md-offset-1">
- <div class="panel panel-default">
- <div class="panel-heading">Dashboard</div>
- <div id="search">
- <div id="search-wrapper">
- <input placeholder="Search" type="text" class="ui-widget" id="search-input" />
- <i id="cross" class="icon"></i>
- </div>
- </div>
- <div class="panel-body">
- <table id="employees" class=" table table-condensed table-hover">
- <thead style="font-size: 14px;">
- <tr v-for="employee in employees | orderBy 'first_name' order">
- <th >E. Number </a></th>
- <th> Firstname </th>
- <th> Lastname </th>
- <th> Title </th>
- <th> Direction </th>
- <th> Recruitment date </th>
- <th> Grade </th>
- </tr>
- </thead>
- <tbody id="data">
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
- <script type="text/javascript" src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
- <script type="text/javascript">
- /*$(document).ready(function(){
- var route = "{{ URL('/employees') }}";
- $.get(route, function(res){
- $(res).each(function(key, value){
- $('#data').append("<tr><td>"+value.employee_N+"</td><td>"+value.frst_name+"</td><td>"+value.last_name+"</td><td>"+value.title+"</td><td>"+value.direction+"</td><td>"+value.recruitment_date+"</td><td>"+value.grade+"</td></tr>");
- });
- });
- });*/
- </script>
- <script type="text/javascript" >
- $('document').ready(function(){
- /* $('#search-input').attr('autocomplete', 'on');*/
- $("#search-input").autocomplete({
- source : '{{ URL('/api/employees') }}',
- minlength: 1,
- autoFocus: true,
- /* select: function(event,ui){
- $('#search-input').val(ui.item.value);
- $('#employee_N').val(ui.item.employee_N);
- $('#first_name').val(ui.item.first_name);
- $('#last_name').val(ui.item.last_name);
- $('#status').val(ui.item.status);
- }
- */
- });
- });
- </script>
- @endsection