mercredi 27 avril 2016

How to display data on datatables using laravel 5?

I am using laravel 5 and I want to show field in jenis_surat column in database to my table using datatables. I want to using JSON, do you know how to show the number depends on the entries of the data. example:

No. Jenis Surat. .Action
1. . .A . . . . . . . . . Edit | Delete
2. . .B . . . . . . . . . Edit | Delete
3. . .F . . . . . . . . . Edit | Delete

here is my controller (It's just shows data in jenis_surat):

public function jenissurat()
{return view('jenissurat');}

  public function datajenissurat()
{
    $jenissurat = new JenisSurat();
    $jenissurats = $jenissurat->select('jenis_surat')->get();   
    return $jenissurats;
}

And how to display it on datatables?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire