I am currently using Datatable in my laravel project for displaying my day configuration from my database. I would like to display my data in the following order, Monday -> Tuesday -> Wednesday etc. Currently it is being ordered by alphabetical order from my database where the day column is store as string. Below are ..
Category : datatable
In laravel 5.8 app with DataTables 1.10.22 I need to add message No data available in table If there are no rows in result set Searching for decision I added emptyTablein table definition : $(‘#invoices’).DataTable({ rowReorder: true, responsive: true, "aaSorting": [], "emptyTable": "no data available in table.", "initComplete": function(settings, json) { $(this).removeClass("no-footer"); } }); But ..
In Laravel I use the datatable plugin for my tables. For the users view section, because I wanted the administrator to be able to see brief information about that user by clicking on a button on the same page. I used livewire, which by clicking on that button opens a modal with information from that ..
I’ve setup an auth system in laravel which works fine. I’ve created a rest api to call some data, the route of this api is protected by the auth middleware and an api guard with a token driver. ‘admin-api’ => [ ‘driver’ => ‘token’, ‘provider’ => ‘admins’, ‘hash’ => false, ], I have a filed ..
I am doing a project with vue and laravel 5.6, I need to install npm install –save pdfmake npm install –save datatables.net-bs4 npm install –save datatables.net-buttons-bs4 but I get an error. BEFORE THE ERROR I FIGURE THIS WARNING, I DON’T KNOW IF THERE WILL BE SOMETHING TO SEE npm WARN EBADENGINE Unsupported engine { npm ..
I’m about to pass the checked columns from Child Component on my Parent Component through $emit. Then I was able to get the passed value. Here’s the example of my Child Component:Child.vue <div class="custom-control custom-control-sm custom-checkbox"> <input type="checkbox" class="custom-control-input sc-modal-body-form-check1-input" id="col-foo1" value="foo1" v-model="fooColumns"> <label class="custom-control-label sc-modal-body-form-check1-label" for="col-type">Foo 1</label> </div> <div class="custom-control custom-control-sm custom-checkbox"> <input type="checkbox" ..
I’m about to pass the checked columns from Child Component to my Parent Component through $emit. Then I was able to get the passed value. Here’s the example of my Child Component:Child.vue <div class="custom-control custom-control-sm custom-checkbox"> <input type="checkbox" class="custom-control-input sc-modal-body-form-check1-input" id="col-foo1" value="foo1" v-model="fooColumns"> <label class="custom-control-label sc-modal-body-form-check1-label" for="col-type">Foo 1</label> </div> <div class="custom-control custom-control-sm custom-checkbox"> <input type="checkbox" ..
I’m using Laravel and Livewire for the first time, so apologize if the question is silly. I’ve read from Livewire documentation https://laravel-livewire.com/docs/2.x/events that Livewire components can communicate with each other through a global event system. As long as two Livewire components are living on the same page, they can communicate using events and listeners. I ..
I have a problem when I want to display and sort Users data from database to data table. My console doesn’t show any errors either This is my Controller in Laravel public function data(Request $request) { $orderBy = ‘users.id’; switch ($request->input(‘order.0.column’)) { case "0": $orderBy = ‘users.id’; break; case "1": $orderBy = ‘users.name’; break; case ..
I’m trying to store data into database by ajax request and display stored data in datatable wihtout reloading the page. My form data is stored perfectly but table row does not add perfectly. Here is my form <form id="videoAddForm" method="POST" enctype="multipart/form-data"> @csrf <div class="modal-body"> <div class="col-xl-12 col-md-12"> <div class="ms-form-group"> <label for="name">Name</label> <input type="text" class="form-control" name="name" ..
I try to use editor datatable trial fot my work. I follow this tuto but I can’t get the editor buttons to work. I got this error when i add the editor function in the html function on my ClientsDataTable : $.fn.dataTable.Editor is not a constructor See my code index.blade.twig : @extends(‘dashboard.base’) @section(‘css’) /*<link rel="stylesheet" ..
Is there a way to order a datatable by an added column? I couldn’t figure it out . Example: return datatables()->of(Restaurant::select(‘id’,’denumire’)->where(‘id_stare’,1)->with([‘orders’=> function($q) use($startDate, $endDate){ $q->where(‘created_at’, ‘>=’,$startDate->toDateTimeString())->where(‘created_at’, ‘<=’,$endDate->toDateTimeString()); }]) ) ->addIndexColumn() ->addColumn(‘suma’, function(Restaurant $restaurant) { $suma = $restaurant->orders->sum(function($item){ return $item->total; }); return intval($suma); }) ->make(true); In front i use the JavaScript DataTable framework , but the ..

How do I sort according to the second data? The sorting works only on the ID. But in my table, I added a badge count and thats what I want to sort. Here is my controller return DataTables::of($users) ->addIndexColumn() ->addColumn(‘Inventories’, function ($row) { if($row->status != ‘Dumped2’) { return ‘<a href="’.route(‘admin.clients.show-client-inventories2′, $row->id).’" class="btn btn-info btn-sm">’.__("Inventories").’ <span ..

I have created a server side pagination datatable, but when created it shows only the limited records(10 records) on the first load of datatable. After the initial load there is only one button shown as 1. there is no previous or next button and there is no buttons like 2,3,4,etc. My client side code is: ..
So I am using the Laravel Yajra Datatable and when i try to render the data then I got the blank response.But Server is Returning the correct data as i debug. As you can see in the screenshot totalRecords is showing 1,But Data key is blank. Appreciate for any help Please find attached image below. ..
I want to merge restaurant name and location to be in one column, Im uisng laravel and I don’t want to merge it using the editcolumn from the controller because this will not allow search to work and I will get in trouble as Im using eloquent as explain here https://github.com/yajra/laravel-datatables/issues/2293 so I have to ..
Im facing a complex problem since datatable is very slow when I use get with model so I read about using query or select* instead, for now it works fine and very fast but the problem when I do search for a column it doesn’t work and shows error, this if the model has relations ..
I;m working with Yajra Datatables, I want to know if there is any way to add column (td) attribute while adding it. e.g I’m adding td for "days" column and i want it must have a attribute -> "data-sort" How to add it? Here is my some code sample return Datatables::of($schedule) ->addColumn(‘recruiter_name’, function ($schedule) { ..
I am new to Laravel framework and working on one project in which I am doing customizations and trying to add and more field to upload image in datatable and when it is uploaded I want to click on that image and it gets directly downloaded. I have tried almost every possible solution but do ..

Laravel Yajra DataTable Column Sorting not proper working. If I use ->get() function in Query then DataTable sorting works fine. But I don’t want to use get() function because If I have records more then 1 lakh then it takes more time so I don.t want to use get() in query here is my controllers ..
I want to store data in database using ajax & want to display stored data into blade without refreshing the page. Data is stored successfully but I don’t know how to load data without refreshing the page. Here is my controller code $product= Product::create([ ‘title’ => $request->title, ‘description’ => $request->description, ]); $data = array(); $data[‘success’] ..
I’m working this datatable like two or three days. But it’s related to Laravel. When I want to make a route, I can’t do it. Or I do not know how to do it. This is my code in app-user-list.js for dropdown buttons: // Actions targets: -1, title: ‘Action’, orderable: false, render: function (data, type, ..

I have datatable that show user task. I’ve created the filter for KPI table to show specific KPI (Yes or No). The problem is when I use get() method I can’t filter with the dropdown, and if I replace get() using latest() $data = Post::where(‘user_id’, Auth::user()->uid)->latest();or remove it $data = Post::where(‘user_id’, Auth::user()->uid);, my datatable can’t ..

I want to add line break after datatable buttons and is shown below I want it should look like this I have use dom: ‘Blfrtip’, Sourc..
I’m trying to check compability of my Laravel 8 project, I have datatables with route ajax: { url: "/detail/" + user_id, data: function(d) { d.kpi = $(‘#filter-kpi’).val(), d.search = $(‘input[type="search"]’).val() } }, when I acces it from artisan serve, it works pretty well (http://127.0.0.1:8000/detail/1000000004). But, when I access it using apache server in XAMPP (http://localhost/project-management-main/public/detail/1000000004), ..