Donations Appreciated

Doing nothing for others is the undoing of ourselves. - Horace Mann

Click here to lend your support to: Laravel Datatables and make a donation at !

FluentController.php - fluent.getJoins.title

Heads Up! When using join statements, you must follow the table.column approach on your js columns definition.

Example columns definition:

columns: [{data: 'id', name: ''}, {data: 'name', name: ''}]

Id Title Author Name Created At Updated At


    public function getJoins()
        return view('datatables.fluent.joins');

    public function getJoinsData()
        $posts = DB::table('posts')->join('users', 'posts.user_id', '=', '')
            ->select(['', 'posts.title', '', '', 'posts.created_at', 'posts.updated_at']);

        return Datatables::of($posts)
            ->editColumn('title', '{!! str_limit($title, 60) !!}')
            ->editColumn('name', function ($model) {
                return \HTML::mailto($model->email, $model->name);


        processing: true,
        serverSide: true,
        ajax: '',
        columns: [
            {data: 'id', name: ''},
            {data: 'title', name: 'posts.title'},
            {data: 'name', name: ''},
            {data: 'created_at', name: 'posts.created_at'},
            {data: 'updated_at', name: 'posts.updated_at'}