Category : datatable

I am trying to put a download button within a dataTable in Laravel but am getting the following error: "DataTables warning: table id=dataTableBuilder – Exception Message: Undefined variable: fileName". This is my ReportController snippet: public function store(CreateReportRequest $request) { $request->validate([ ‘file_path’ => ‘required|mimes:pdf|max:2048′ ]); $report = new Report; if($request->file()) { $fileName = time().’_’.$request->file_path->getClientOriginalName(); $filePath = ..

Read more

I want to proccess data while server is sending data. I can draw a table with hardcode numbers but I can´t set url to ajax query.. Ajax view: data: { ‘fecha_desde’: $("#fecha_desde").val(), ‘fecha_hasta’: $("#fecha_hasta").val(), ‘aplicacion’: JSON.stringify(ArrayAplicaciones), ‘equipos’: JSON.stringify(ArrayEquipos) }, ajax: function (data, callback, settings) { var out = []; for (var i=data.start, ien=data.start + data.length; ..

Read more

I have functional all the table of Datatables, the issue is that I was asked that for some roles I must hide data and others show them, from the controller I can make the validation but in the script I can not hide My Controller, this works ->addColumn(‘seller’, function(Ticket $ticket){ if (Auth::user()->hasRole(‘admin’) || Auth::user()->hasRole(‘supervisor’)) { ..

Read more

good morning, i want to ask. how to fix search results with datatable? as in the picture, when I enter the keyword "corp", data that doesn’t have the keyword "corp" appears. enter image description here index.blade.php @extends(‘layouts.be’) @push(‘css’) <link rel="stylesheet" type="text/css" href="{{ asset(‘css/backend/select2.min.css’)}}"> <style> .btn-sm { padding: .25rem .5rem !important; font-size: 12px !important; margin: 3px ..

Read more

Laravel datatable using server side pagination, when doing any action on the datatable the indexing changes not in the correct order. The controller code is below return Datatables::of($newsletters) ->editColumn(‘created_at’, function($row) { return Carbon::parse($row->created_at)->format(‘d-m-Y’); }) ->rawColumns([‘created_at’]) ->make(true); } JS code : if($(‘#admin_news_letters_view’).length > 0) { $(document).ready(function () { var i = 1; $(‘#admin_news_letters_view’).DataTable({ processing: true, serverSide: ..

Read more

I am using datatables server side for returning my data.When i click the details button,when paginating in the correct order, it works perfect, but when i jump to a random page, it is’nt returning the correct id, and incorrect info. This is my controller code : public function view() { if (request()->ajax()) { $test_drives = ..

Read more

I am finding DataTables warning: table id=product-data-table – Ajax error after uploading to my addon domain. But it is working on my local server. Controller: public function productData(Request $request) { $columns = array( 1 => ‘name’, 2 => ‘code’, 3 => ‘brand_id’, 4 => ‘category_id’, 5 => ‘qty’, 6 => ‘unit_id’, 7 => ‘price’, 8 ..

Read more

I have a datatable that I would like to initialize with an Ajax call http://url/api/v1/shocks table.blade.php <div class="card-body p-0"> <div class="table-responsive"> <table class="table table-striped table-md" id="table-raw-shocks" width="100%" cellspacing="0"> <thead> <tr> <th>Record Id</th> <th>Count</th> <th>Date</th> <th>Amplitude 1 (G)</th> <th>Amplitude 2 (G)</th> <th>Time 1 (s)</th> <th>Time 2 (s)</th> <th>Freq 1 (Hz)</th> <th>Freq 2 (Hz)</th> </tr> </thead> <tfoot> ..

Read more

Using Yajra Datables, Laravel is returning "Memory exhausted…" error message. Actually how do we applying the filtering & sorting directly to the SQL instead of letting the server-side handle the filtering & sorting. Laravel controller // Table1 has 200,000 rows, the query itself is also slow $rs = DB::select("select * from Table1"); $numrow = count($rs); ..

Read more

How to keep the values filtered in the page after refresh. Keep filtered items populated with the last selected values when I route back to this view. <vk-datatable :columns="columns" :rows="filteredProducts" :per_page="8" :actions="actions" v-on:row_click="rowClick" v-on:row_delete="rowDelete" v-on:row_edit="rowClick" v-if="filteredProducts" :loadingPropData="$apollo.queries.products.loading" ></vk-datatable> Source: Laravel Sta..

Read more

I am using a server-side data table with laravel and I am trying to search Apostrophe’s value (Fran’k) but it’s not working with individual column search. Please help me I am using below code for column search $(‘input’, this ).on( ‘keyup change’, function () { if (tables.column(i).search() !== this.value ) { tables .column(i) .search(this.value ) ..

Read more

I am beginner in Laravel. I use in my project Laravel 7. I use yajra/laravel-datatables in my project. I have this code: <table class=”table table-bordered data-table “> <thead> <tr> <th>ID</th> <th>Tytuł</th> <th>Status</th> <th width=”100px”>Akcja</th> </tr> </thead> <tbody> </tbody> </table> $(function () { var table = $(‘.data-table’).DataTable({ processing: true, serverSide: true, ajax: “{{ route(‘tabelka.tabelka2’) }}”, columns: ..

Read more

I’m using freshbitsweb/laratables. I want to select rows with checkboxes. Is it possible? I tried to add select:true, but didn’t work. $(‘.dataTable’).DataTable({ serverSide: true, processing: true, responsive: true, select: true, ajax: “{{route(‘jets.dataTable’)}}”, columns: [ { name: ‘id’}, { name: ‘name’}, { name: ‘actions’, orderable: false, searchable: false } ], }); Source: Laravel Sta..

Read more

I wanted to install DataTable in laravel, I used WAMPServer and my PHP version is 7.3.5, Mysql version 5.7.26. I follow many steps on the internet, such as download from pecl.php.net but my problem remain. When write composer require yajra/laravel-datatables-oracle:^9.0 in CMD, after wile the below error showed and cause installation stop. Error: problem1 -The ..

Read more