i'm using chumper datatables to showing data,I want to display data based on the user who is logged and location, so the conclusion like this, user has the location of the task, user can only see the data corresponding to the location he was, I use a login system with sentry cartalyst
my source code, but appear all, without by login - session :
public function getDatatable()
{
$datalokat = DB::table('simp_lkt')
->join('simp_jk', 'simp_lkt.id_jk', '=', 'simp_jk.id_jk' )
->join('simp_tpelayan', 'simp_lkt.id_tpelayan', '=', 'simp_tpelayan.id_tpelayan')
->select(
'simp_lkt.id_loke as id_loke',
'simp_lkt.nama_pas as nama_pas',
'simp_lkt.no_asur as no_asur',
'simp_lkt.no_reg as no_reg',
'simp_jk.klmn as klmn',
'simp_tpelayan.tpt_pelayan as tpt_pelayan');
return Datatable::query($datalokat)
->showColumns('no_reg', 'nama_pas', 'klmn', 'tpt_pelayan', 'no_asur')
->addColumn("konfigurasi", function($lokat) {
$route = route("lokat.show", $lokat->id_loke);
return "<a href='$route' class='btn fa fa-search'></a>";
})
->searchColumns('no_reg', 'nama_pas', 'klmn', 'tpt_pelayan', 'no_asur')
->make();
}
sorry my english is bad
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community