#### Category : datatable

I am new to KTDatatable in Metronic. I am trying to use server side pagination in Metronic dashboard, and I am parsing the data in a KTDatatable, but I can’t find a way to parse the returned data from the API and to view number of pages and each page URL. The code that I ..

I already use Laravel 8 with Yajra DataTable et wanted to test Infyom Laravel-Generator that seems to be a great package. I created my first test app and generated a Yajra DataTable. I see the datatable page, I was able to create a first record, the table in the database is updated, but the page ..

So basically i have a datatable with approx 20000 rows of data, i have a few different filters and am trying to work out the best way to apply the filters. I have basically applied them to the elequent query, except the where like statement will originally be "" which is fine for any of ..

i am using datatables to load the companies table and it has +13K companies it takes so much time to load everything, i wanna turn it into server side but i am having so much trouble doing that : datatable image the datatable code : <div class="panel-body"> <table id="datatable" class="table table-striped table-bordered" style="width:100%"> <thead> <tr> ..

I have use Yajra datatables in my Laravel project, but there is a problem when sorting (also searching) datatables. column ‘created_at’ in order clause is ambiguous I know that this error is because other tables has ‘created_at’ column. but I don’t know how to fix it. Here is my controller: public function index() { $partners .. Read more I have invoices table, which uses yajra laravel datatable. I want to filter data using ‘created_at‘ column, which does exists in invoices table in the database but not in the table view. Here is my datatable image: and the code which takes start and end dates:$(function() { $(‘#invoices_daterange’).daterangepicker({ opens: ‘left’ }, function(start, end, label) .. Read more I’m trying to store data into a database and I encountered a situation where I don’t know is it feasible or not to do that. so I have two following tables in the database public function up() { Schema::create(‘castings’, function (Blueprint$table) { $table->increments(‘id_casting’);$table->string(‘nom’); $table->string(‘prenom’);$table->string(‘cine’); $table->date(‘date_naissance’);$table->string(‘lieu_naissance’); $table->integer(‘mineur’)->default(‘0’);$table->integer(‘id_representant’)->nullable()->unsigned(); $table->timestamps();$table->foreign(‘id_representant’)->references(‘id_representant’)->on(‘representants’); }); } ..

I have a problem with filtering datatable through relationships. I have a table with the main model with the various relationships and I need to filter concatenated name and surname It doesn’t came out any error but does not find any results Controller: $data = Repair::with(‘clients’,’categories’,’brands’,’modells’,’typeRepairs’,’states’,’stateClients’) ->select("*"); return Datatables::of($data) ->addIndexColumn() ->filterColumn(‘nomecognome’, function($query,$keyword) { $query->whereHas("clients", .. Read more i want to make my select format sql data searchable on datatable but i dont know how to put it. if its just normal column, we can just put the column name on datatable "name:" operation. but this one is a generated column. thanks in advance$query = Requests::select([ ‘requests.id as id’, ‘requests.current_status as current_status’, ..

I have a data table but instead of displaying two buttons on the action column it rather displays the HTML code so what cold be the problem. <tbody> @foreach ($subjects as$key => $subjects) <tr> <td class="bs-checkbox "><input data-index="0" name="btSelectItem" type="checkbox"></td> <td>{{$key+1}}</td> <td>{{$subjects->name}}</td> <td>{{$subjects->description}}</td> <td>@if ($subjects->status==1) Active @else Deactivated @endif </td> <td> <div class="btn-group"> <a .. Read more I wanted to fetch data from two tables using inner join in Laravel 8 and show it in front end as datatable by Ajax. But ajax call is returning internal server error. Here is my controller if(request()->ajax()) { return datatables()->of(Machine::select("machine_base.id as id", "machine_base.machine_name as machine_name", "machine_base.machine_category as category_id", "item_category_base.category as category_name")) ->innerJoin("item_category_base", function($join){ $join->on("item_category_base.id", "=", .. Read more I am applying date range filter with the help of package yajra laravel . but it returns me error as "DataTables warning: table id=order_table – Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1" Please suggest some solution. This is my view code <main id="main-container"> <!– Page Content –> <div class="content"> <h2 .. Read more Iam trying to display data on a datatable, I am getting following error Exception Message: App/Transaction::shipping_address must return a relationship instance. ->addColumn(‘shipping_address’, function ($row) { if($row->shipping_address==NULL || trim($row->shipping_address)==”) { return "Un Assigned"; } else { return $row->shipping_address; } }) Sourc.. Read more I am using laravel 8x. Iam building a CRM project and i have a problem with yajradatatable. Why data table is seems like that, how can i fix it? Thanks. YajraDataTable Sourc.. Read more I want to Put a single column in the child row of multiple parent columns in datatable/yajra datatable. till now I have done this much but don’t know how to put a single column below multiple columns. ‘columns’: [ { ‘data’: ”, ‘name’: ”, "defaultContent": ""}, // { ‘data’: ‘website_url_value’, ‘name’: ‘website_url_value’}, { data: null, .. Read more i have an audit trails report to show the data based on range of date, selected by user. So user will select the range in page (audits) and when click submit will redirect to page (audits_view). I want to show the data in datatables, but in audits_view, the result that i get is only raw .. Read more I’m trying to receive data on the client-side from the controller using ajax, but what is happened is I received data and it shows in the table when I using complete function in ajax but when I use success function the data did not show in the table. From what I know the success function .. Read more I am having a problem in relation search query. Due to my other two db table from different DB server. Example code on below UserWallet(Main DB) morphTo (Different DB server) "[MemberWallet/GuestWallet/StaffWallet]::class" relationship hasOne "account" When i running this script, i getting this error -> Instantiation of ‘Closure’ is not allowed It look like different connection .. Read more So I tried to show full name data from the table, it works but somehow it only shows the first word, not the entire sentence. any ideas? Sourc.. Read more i’m got stuck for 2 days, i got confused how to render column usind yajra/laravel-datatable i’m using postgre as database, and yajra/laravel-datatables as package. i have query builder like this$data = DB::select("SELECT * FROM get_list_count_amount_transaction(‘chat’, ‘done’, ‘2019-03-01’, ‘2021-12-31’ )")[0]; which generates a value of object : (i use var_dump() to see the value) { ..

Iam working on Laravel project.. I face a problem with this Datatable it keep giving me "DataTables warning: table id=customer-table – Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1" and I tried to dd($items) in controller but nothing hsppens I think it not seeing the function can you help me? my .. Read more I am currently showing data of mine and my friend in yajra laravel datatable but I want to change color of row which have data of my friends. this is how I got data of two different users$user = Auth::user(); $friend_ids =$user->friends()->pluck(‘friend_id’)->toArray(); $posts = PostModel::whereIn(‘users_id’,$friend_ids) ->leftJoin(‘users’, ‘posts.users_id’, ‘=’, ‘users.id’) ->orWhere(‘users_id’,auth()->user()->id) ->select(‘posts.id as ..

this is the code im using to fill my datatable, but no data is printed, this is the route i create to access data, i can see it when i acces directly with the web: Route::get(‘listsolicitudes/solicitudes’,’[email protected]’)->name(‘datatable.solicitudes’); And this is the script I am using: $(function() {$(‘#tablesolicitud’).DataTable({ "ajax":{ "url": "{{route(‘datatable.solicitudes’)}}", "dataSrc": "" }, "columns": [ ..
this is the code im using to fill my datatable, but no data is printed, this is the route i create to access data, i can see it when i acces directly with the web: Route::get(‘listsolicitudes/solicitudes’,’[email protected]’)->name(‘datatable.solicitudes’); And this is the script I am using: $(function() {$(‘#tablesolicitud’).DataTable({ "ajax":{ "url": "{{route(‘datatable.solicitudes’)}}", "dataSrc": "" }, "columns": [ ..