You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`
namespace App\Http\Controllers;
use Session;
use Illuminate\Http\Request;
use App\Model\Persuratan;
use App\Http\Requests;
use App\DataTables\ArsipTable;
class AdminController extends Controller
{
public function arsip(ArsipTable $dataTable){
return $dataTable->render('admin.arsip.index');
}
}`
* ArsipTable.php*
`<?php
namespace App\DataTables;
use App\Model\Persuratan;
use Yajra\Datatables\Services\DataTable;
class ArsipTable extends DataTable
{
// protected $printPreview = 'path.to.print.preview.view';
/**
* Display ajax response.
*
* @return \Illuminate\Http\JsonResponse
*/
public function ajax()
{
return $this->datatables
->eloquent($this->query())
->addColumn('action', function($id){
$button = '<form action="/adm/arsip/'.$id->id.'" method="POST">'.'<a href="/adm/arsip/'.$id->id.'" class="btn btn-sm btn-warning" title="Ubah Surat"><i class="fa fa-edit"></i></a>';
$button .= '
<button type="submit" class="btn btn-sm btn-danger"><i class="fa fa-trash"></i></button>
<input type="hidden" name="_method" value="DELETE">
</form';
return $button;
})->make(true);
}
/**
* Get the query object to be processed by datatables.
*
* @return \Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder
*/
public function query()
{
$persuratan = Persuratan::select();
return $this->applyScopes($persuratan);
}
/**
* Optional method if you want to use html builder.
*
* @return \Yajra\Datatables\Html\Builder
*/
public function html()
{
return $this->builder()
->columns(['no_surat', 'tujuan', 'jenis','ket','created_at','lampiran','action' => ['orderable' => false, 'searchable' => false] ])
->parameters($this->getBuilderParameters());
}
/**
* Get columns.
*
* @return array
*/
private function getColumns()
{
return ['no_surat', 'tujuan', 'jenis','ket','created_at','lampiran'];
}
/**
* Get filename for export.
*
* @return string
*/
protected function filename()
{
return 'ArsipTable';
}
}
`
System details
Operating System Win 10 With Using XAMPP
PHP Version Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.5.15
Laravel Version 5.2.35
Laravel-Datatables 6.11.5
when I click pagination , order , search , and select entries in the table shows the error datatables.net/tn/7 datatables.
sorry ! my english is bad
The text was updated successfully, but these errors were encountered:
@ri7nz I think this is an environment related issue where routes intermittently returns NotFound exception. There are several closed issues like this and most of are them are related to artisan serve. I suggest you use homestead if possible. Thanks!
Summary of problem or feature request
Code snippet of problem
Controller.php
* ArsipTable.php*
System details
when I click pagination , order , search , and select entries in the table shows the error datatables.net/tn/7 datatables.
sorry ! my english is bad
The text was updated successfully, but these errors were encountered: