PHPackages                             dilum/puppy-data-table - 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. dilum/puppy-data-table

ActiveLibrary

dilum/puppy-data-table
======================

Lightweight Laravel DataTable with Yajra-like features and a vanilla JS frontend

1.0.0(8mo ago)04.0k↓50%MITPHPPHP ^7.3|^8.0

Since Aug 26Pushed 8mo agoCompare

[ Source](https://github.com/dilumsadeepa/puppy-data-table)[ Packagist](https://packagist.org/packages/dilum/puppy-data-table)[ RSS](/packages/dilum-puppy-data-table/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

🐶 Puppy DataTable (Laravel Package)
===================================

[](#-puppy-datatable-laravel-package)

A lightweight Laravel backend DataTable package that makes it easy to build paginated, searchable, and sortable API responses for your frontend tables. Unlike heavy alternatives, Puppy DataTable is simple, fast, and dependency-free.

🚀 Features
----------

[](#-features)

- ✅ **Lightweight** – no jQuery or heavy frontend dependencies
- ✅ **Works with any Eloquent model or query builder**
- ✅ **Built-in support for search, sort, and pagination**
- ✅ **Add custom computed columns easily**
- ✅ **API-friendly JSON responses**

📝 Front-End Package
-------------------

[](#-front-end-package)

```
https://www.npmjs.com/package/puppy-data-table
```

📦 Installation
--------------

[](#-installation)

**Require the package via Composer:**

```
composer require dilum/puppy-datatable
```

⚡ Usage Example
---------------

[](#-usage-example)

**Controller Example**

```
use Dilum\PuppyDataTable\DataTable;
use App\Models\User;
use Illuminate\Http\Request;

class UserController extends Controller
{
    public function index(Request $request)
    {
        return DataTable::of(User::query())
            ->searchable(['name', 'email'])
            ->addColumn('full_name', function ($user) {
                return trim($user->first_name . ' ' . $user->last_name);
            })
            ->editColumn('mobile_number', function ($user) {
                return $user->c_code . $user->mobile_number;
            })
            ->orderColumn('created_at', function ($query, $dir) {
                $query->orderBy('created_at', $dir);
            })
            ->toResponse($request);
    }
}
```

📤 Example API Response
----------------------

[](#-example-api-response)

```
{
  "data": [
    {"id":1, "name":"John", "email":"john@example.com", "full_name":"John Doe"},
    {"id":2, "name":"Jane", "email":"jane@example.com", "full_name":"Jane Smith"}
  ],
  "meta": {
    "total": 50,
    "page": 1,
    "per_page": 10
  }
}
```

🛠️ Methods
----------

[](#️-methods)

MethodDescription`of($query)`Bind the DataTable to an Eloquent query or query builder`searchable(array)`Define which columns are searchable`addColumn($key, $callback)`Add custom computed column`editColumn($key, $callback)`Edit custom computed column`orderColumn($key, $callback)`Define custom ordering for a column`toResponse($request)`Return API-ready JSON response🎯 Example with Custom Columns
-----------------------------

[](#-example-with-custom-columns)

```
return DataTable::of(User::query())
    ->searchable(['name', 'email'])
    ->addColumn('status', function ($user) {
        return $user->is_active ? 'Active' : 'Inactive';
    })
    ->toResponse(request());
```

📄 License
---------

[](#-license)

**MIT License** – free for personal and commercial use.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance58

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

266d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bdffae56a892e7eb29a94ce1d538015bb60ac3d89487cf521fcd3b6945e1f812?d=identicon)[Dilum Sadeepa](/maintainers/Dilum%20Sadeepa)

---

Top Contributors

[![dilum-cpu](https://avatars.githubusercontent.com/u/255337510?v=4)](https://github.com/dilum-cpu "dilum-cpu (3 commits)")[![dilum-ilabs](https://avatars.githubusercontent.com/u/255337510?v=4)](https://github.com/dilum-ilabs "dilum-ilabs (3 commits)")[![dilumsadeepa](https://avatars.githubusercontent.com/u/51749100?v=4)](https://github.com/dilumsadeepa "dilumsadeepa (1 commits)")

### Embed Badge

![Health badge](/badges/dilum-puppy-data-table/health.svg)

```
[![Health](https://phpackages.com/badges/dilum-puppy-data-table/health.svg)](https://phpackages.com/packages/dilum-puppy-data-table)
```

###  Alternatives

[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1225.0k10](/packages/fleetbase-core-api)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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