PHPackages                             flatorb/moldssp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. flatorb/moldssp

ActivePackage[Database &amp; ORM](/categories/database)

flatorb/moldssp
===============

A package library to use laravel pagination with datatables and mongodb.

1.1.6(1y ago)0772[1 issues](https://github.com/Flatorb/moldssp/issues)MITPHP

Since Sep 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Flatorb/moldssp)[ Packagist](https://packagist.org/packages/flatorb/moldssp)[ RSS](/packages/flatorb-moldssp/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (2)Versions (11)Used By (0)

MoLDSSP - MongoDB Laravel Datatables SSP
========================================

[](#moldssp---mongodb-laravel-datatables-ssp)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)![Travis](https://camo.githubusercontent.com/0fe11a942b7c15d6593389069add5b2f087c6e242f18f92e14458981a17c3c72/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f666c61746f72622f6d6f6c647373702e7376673f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/2a6179e4ca6a2870ba1e434c66f52dc91652ff8254c053f31f548818d89583d2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666c61746f72622f6d6f6c647373702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/flatorb/moldssp)

This package library makes it easier to use Laravel server side pagination functionality with MongoDB and Datatables (datatables.net).

Install
-------

[](#install)

`composer require flatorb/moldssp`

Usage
-----

[](#usage)

### DataTables.net plugin

[](#datatablesnet-plugin)

Add the datatables.net javascript library to your application either using CDN.

### View

[](#view)

On your blade (view) file establish the table with the following base structure.

```

            ID
            Title
            Author
            Date
            Status

```

And within your script tags of the page:

```

    $(document).ready(function () {
        $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
        });

        $('#postsTable').DataTable({
            serverSide: true,
            ajax: {
                url: '/api/posts',
                data: function(d) {
                    d.page = (d.start/d.length) + 1;
                },
                dataFilter: function(data) {
                    var json = jQuery.parseJSON(data);
                    json.recordsTotal = json.total;
                    json.recordsFiltered = json.total;

                    return JSON.stringify(json);
                }
            },
            language: {
                lengthMenu: "Show _MENU_",
            },
            dom: "" + "" + "",
            processing: true,
            bStateSave: true,
            fixedHeader: {
                headerOffset: 119
            },
            lengthMenu: [
                [10, 25, 50, 100, 150, -1],
                [10, 25, 50, 100, 150, "All"]
            ],
            pageLength: 25,
            pagingType: "full_numbers",
            order: [[3, "desc"]],
            deferRender: true,
            columns: [
                { "data": "customID" },
                { "data": "title" },
                { "data": {"_":"authorID", "display":"author.name" }},
                { "data": "date" },
                { "data": {"_":"statusID", "display":"status.name" }}
            ]
        });
    });

```

### Controller

[](#controller)

```
namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

use App\Models\Post;

use Flatorb\Moldssp\Moldssp;

class PostsController extends Controller
{
    public function __construct() {
        // your own code here
    }

    public function index(Request $request)
    {
        return Moldssp::paginator(Post::query(), $request);
    }
}

```

Issues
------

[](#issues)

If you discover any functionality or compatibility issues (other than security issues), please use the [Github bug tracker](https://github.com/Flatorb/moldssp/issues) to report them.

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

Testing
-------

[](#testing)

Need to implement. Contributions to this section will be highly values.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

We encourage contribution to this package

Credits
-------

[](#credits)

- [Anushan W](https://github.com/anushanw)
- [Flatorb](https://github.com/flatorb)
- [All Contributors](https://github.com/flatorb/moldssp/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](/LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance49

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~168 days

Recently: every ~237 days

Total

9

Last Release

369d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/da4bab1d6433011d837c58fecb9e11536dab3f6c7ce6be51db69ff590f8ab8d4?d=identicon)[anushanw](/maintainers/anushanw)

---

Top Contributors

[![anushanw](https://avatars.githubusercontent.com/u/7438382?v=4)](https://github.com/anushanw "anushanw (18 commits)")

---

Tags

laravelpaginationdatatablesmongodbsspserver side processing

### Embed Badge

![Health badge](/badges/flatorb-moldssp/health.svg)

```
[![Health](https://phpackages.com/badges/flatorb-moldssp/health.svg)](https://phpackages.com/packages/flatorb-moldssp)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[pimlie/laravel-datatables-mongodb

Laravel DataTables plugin to support Mongodb

1245.9k](/packages/pimlie-laravel-datatables-mongodb)[moharrum/laravel-adminer

Adminer database management tool for your Laravel application.

451.0k](/packages/moharrum-laravel-adminer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
