Skip to content

Instantly share code, notes, and snippets.

@subdesign
Created February 25, 2014 20:36
Show Gist options
  • Save subdesign/9217156 to your computer and use it in GitHub Desktop.
Save subdesign/9217156 to your computer and use it in GitHub Desktop.
public function articlesajax()
{
$result = DB::table('articles')
->join('users', 'articles.user_id', '=', 'users.id')
->select('articles.id as id', 'articles.title as title', 'users.fullname', 'articles.created_at', 'articles.updated_at');
return Datatables::of($result)
->add_column('edit', '<a href="/admin/article_edit/{{ $id }}"><i class="icon-list-alt"></i>Szerkesztés</a>')
->add_column('delete', '<a href="/admin/article_delete/{{ $id }}"><i class="icon-trash"></i>Törlés</a>')
->make();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment