Support the ongoing development of Laravel.io →
Session Database

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

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

kang-rpan kang-rpan Joined 12 Nov 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.