Code Duplication    Length = 21-21 lines in 2 locations

src/DataTables/RoleDataTable.php 1 location

@@ 74-94 (lines=21) @@
71
     *
72
     * @return Builder
73
     */
74
    public function html()
75
    {
76
        return $this->builder()
77
            ->language(trans('microboard::datatable', []))
78
            ->addTableClass('table table-striped table-hover align-items-center')
79
            ->columns($this->getColumns())
80
            ->setTableId('role-table')
81
            ->autoWidth(false)
82
            ->orderBy(0)
83
            ->minifiedAjax()
84
            ->dom("<'card'" .
85
                "<'card-header border-0'<'row align-items-center'<'col-12 col-sm-8 col-md-6'<'row no-gutters'<'col-4'l><'col-8'f>>><'col-12 col-sm-4 col-md-6 text-right'B>>>" .
86
                "<'table-responsive't>" .
87
                "<'card-footer'<'row'<'col-12 col-sm-6'i><'col-12 col-sm-6'p>>>" .
88
                "r>")
89
            ->buttons(
90
                Button::make('print')->text('<span>' . trans('microboard::datatable.print') . '</span><i class="fa fa-print"></i>'),
91
                Button::make('excel')->text('<span>' . trans('microboard::datatable.excel') . '</span><i class="fa fa-file-excel"></i>'),
92
                Button::make('reload')->text('<span>' . trans('microboard::datatable.reload') . '</span><i class="fa fa-sync"></i>')
93
            );
94
    }
95
96
    /**
97
     * Get columns.

src/DataTables/UserDataTable.php 1 location

@@ 98-118 (lines=21) @@
95
     *
96
     * @return Builder
97
     */
98
    public function html()
99
    {
100
        return $this->builder()
101
            ->language(trans('microboard::datatable', []))
102
            ->addTableClass('table table-striped table-hover table-sm align-items-center')
103
            ->columns($this->getColumns())
104
            ->setTableId('user-table')
105
            ->autoWidth(false)
106
            ->orderBy(0)
107
            ->minifiedAjax()
108
            ->dom("<'card'" .
109
                "<'card-header border-0'<'row align-items-center'<'col-12 col-sm-8 col-md-6'<'row no-gutters'<'col-4'l><'col-8'f>>><'col-12 col-sm-4 col-md-6 text-right'B>>>" .
110
                "<'table-responsive't>" .
111
                "<'card-footer'<'row'<'col-12 col-sm-6'i><'col-12 col-sm-6'p>>>" .
112
                "r>")
113
            ->buttons(
114
                Button::make('print')->text('<span>' . trans('microboard::datatable.print') . '</span><i class="fa fa-print"></i>'),
115
                Button::make('excel')->text('<span>' . trans('microboard::datatable.excel') . '</span><i class="fa fa-file-excel"></i>'),
116
                Button::make('reload')->text('<span>' . trans('microboard::datatable.reload') . '</span><i class="fa fa-sync"></i>')
117
            );
118
    }
119
120
    /**
121
     * Get columns.