public function getTableData()
    {
        $items = FeedbackContactUs::selectRaw('*, DATE_FORMAT(created_at, "%d %b, %Y ") as date')
            ->where('created_at', '>=', $this->inputDateFrom() . '%')
            ->where('created_at', '<=', $this->inputDateTo() . '  23:59:59')
            ->orderBy('created_at')
            ->get();

        return DataTables::of($items)->addColumn('fullname', function ($row) {
            return $row->fullname;
        })->addColumn('date', function ($row) {
            return $row->created_at->format('d M Y');
        })->make(true);
    }
public function getTableData()
    {
        $items = FeedbackContactUs::selectRaw('*, DATE_FORMAT(created_at, "%d %b, %Y ") as date')
            ->where('created_at', '>=', $this->inputDateFrom() . '%')
            ->where('created_at', '<=', $this->inputDateTo() . '  23:59:59')
            ->orderBy('created_at')
            ->get();

        return DataTables::of($items)->addColumn('fullname', function ($row) {
            return $row->fullname;
        })->addColumn('date', function ($row) {
            return $row->created_at->format('d M Y');
        })->make(true);
    }
public function getTableData ( ) { $ items = FeedbackContactUs :: selectRaw ( '*, DATE_FORMAT(created_at, "%d %b, %Y ") as date' ) -> where ( 'created_at' , '>=' , $ this -> inputDateFrom ( ) . '%' ) -> where ( 'created_at' , '<=' , $ this -> inputDateTo ( ) . '  23:59:59' ) -> orderBy ( 'created_at' ) -> get ( ) ; return DataTables :: of ( $ items ) -> addColumn ( 'fullname' , function ( $ row ) { return $ row -> fullname ; } ) -> addColumn ( 'date' , function ( $ row ) { return $ row -> created_at -> format ( 'd M Y' ) ; } ) -> make ( true ) ; }
Get the data - datatables
@return \Illuminate\Http\JsonResponse
Get the data - datatables