Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Custom Table Laravel Package

dytechltd/custom-table

Laravel package for building customizable data tables with dynamic columns, filtering, sorting, pagination, and row actions. Configure tables quickly from your models or arrays without repetitive Blade markup.

View on GitHub
Deep Wiki
Context7

Getting Started

Treat dytechltd/custom-table as a small Nova dashboard card, not a full table/CRUD package. It is best for “latest X” panels: recent orders, signups, posts, tickets, etc.

Before installing, inspect the repository in this order:

  1. README.md for the exact card class, registration snippet, and publish tags.
  2. composer.json for the laravel/nova version constraint and PHP version. A 2020 release is likely Nova 2/3 era, not Nova 4/5.
  3. src/ for the card class and service provider.
  4. resources/js/ for the Vue component and props contract.
  5. dist/js/ to see whether compiled assets are committed. If not, you will need to build them.

Minimal setup, assuming the package exposes a standard Nova card:

composer require dytechltd/custom-table
php artisan vendor:publish --provider="Dytechltd\CustomTable\CustomTableServiceProvider"
php artisan nova:publish
php artisan optimize:clear

Register the card in app/Providers/NovaServiceProvider.php:

use Dytechltd\CustomTable\CustomTable;

public function cards(Request $request)
{
    return [
        (new CustomTable)->width('full'),
    ];
}

If the namespace/class differs, follow the README. Then verify the card appears on /nova and inspect the browser console/network response if it is blank.

First practical use case: a “Latest orders” card showing the 5 most recent orders with order number, customer, status, and total, linking to the Nova order detail page. Keep the query bounded:

Order::query()
    ->latest()
    ->limit(5)
    ->get(['id', 'number', 'customer_name', 'status', 'total'])
    ->map(fn ($order) => [
        'id' => $order->id,
        'number' => $order->number,
        'customer' => $order->customer_name,
        'status' => $order->status,
        'total' => $order->total,
        'url' => Nova::path()."/resources/orders/{$order->id}",
    ])
    ->all();

Pass that data to the Vue component through the card’s withMeta() or whatever data method the package exposes. If it has no data method, subclass the card and call withMeta() in the constructor or override jsonSerialize().

Implementation Patterns

Use the package as a thin dashboard presentation layer. Keep queries in PHP card classes, pass small arrays to Vue, and let the card render a simple table. Avoid passing Eloquent models directly to the frontend.

A typical implementation pattern:

use Laravel\Nova\Card;

class LatestOrdersCard extends Card
{
    public $component = 'custom-table';

    public function __construct()
    {
        $this->withMeta([
            'title' => 'Latest orders',
            'columns' => [
                ['key' => 'number', 'label' => 'Order'],
                ['key' => 'customer', 'label' => 'Customer'],
                ['key' => 'status', 'label' => 'Status'],
                ['key' => 'total', 'label' => 'Total'],
            ],
            'rows' => $this->rows(),
        ]);
    }

    private function rows(): array
    {
        return \App\Models\Order::query()
            ->latest()
            ->limit(5)
            ->get(['id', 'number', 'customer_name', 'status', 'total'])
            ->map(fn ($order) => [
                'number' => $order->number,
                'customer' => $order->customer_name,
                'status' => $order->status,
                'total' => $order->total,
                'url' => \Laravel\Nova\Nova::path()."/resources/orders/{$order->id}",
            ])
            ->all();
    }
}

Common day-to-day patterns:

  • Dashboard placement: register cards in NovaServiceProvider::cards() for the main dashboard, or in a custom Nova dashboard’s cards() method. Use width('1/2'), width('full'), etc. if the card inherits Nova’s width helpers.
  • Multiple cards: create small subclasses or factory methods for each data source, e.g. LatestOrdersCard, LatestUsersCard, OpenTicketsCard. Do not overgeneralize one card with dozens of conditionals.
  • Scoping by user: pass the authenticated user into the card from cards(Request $request) and scope queries with $request->user(). Do not rely on the card to enforce authorization.
  • Authorization: check policies or Gate::allows() before exposing rows. A dashboard card can easily bypass the normal Nova resource authorization flow.
  • Caching: dashboard cards load frequently. Cache expensive counts/queries for 30–60 seconds with Cache::remember() if the data does not need to be real-time.
  • Links: generate Nova resource URLs with Nova::path() or the resource’s uriKey() rather than hardcoding /nova/resources/....
  • Custom data: if the source is not Eloquent, map it into the same columns/rows shape. Keep the Vue side dumb and the PHP side responsible for formatting.
  • Local customization: if the package’s Vue component is too rigid, copy it into a local Nova card component or fork the package. The PHP card is usually easy to extend; the Vue component is where layout limitations show up.

Gotchas and Tips

  • Maintenance risk is the main concern. Last release was 2020, 4 stars, 0 dependents. Treat it as abandoned or near-abandoned. Pin the exact version/commit, fork it if it becomes important, and avoid building critical admin workflows on it.
  • Nova version compatibility is likely the biggest failure point. Nova 4+ moved to newer Vue/tooling. A 2020 card may be Vue 2-oriented and fail to compile or render under newer Nova. Check package.json and the Nova constraint before investing.
  • Blank cards are usually asset/component registration issues. Check the browser console, the /nova-api/cards response, and whether the Vue component name in the card class matches the registered component. Run php artisan nova:publish, clear caches, and rebuild assets if needed.
  • Do not expose full models. Map only whitelisted fields. Passing Eloquent models into card metadata can leak attributes or create large JSON payloads.
  • Always limit and select columns. A dashboard card should not run Model::all() or load relationships indiscriminately. Use latest()->limit(5) and explicit select().
  • This is not a full table package. It will not give you Nova resource-style sorting, filtering, pagination, row actions, or authorization out of the box. For real data management, use Nova resources; use this card only for summaries.
  • Check the service provider for publish tags and config. If vendor:publish fails, inspect publishes() in the provider rather than guessing the tag.
  • Extension points are likely limited to subclassing the card and overriding the Vue component. Use withMeta() for data, subclass the card for query logic, and fork/publish the Vue component for layout changes. If the package hardcodes columns in Vue, passing new columns metadata may not be enough.
  • Debug incrementally. First render a static card with hardcoded rows. Then add one Eloquent query. Then add links, formatting, and authorization. This isolates whether the problem is Nova asset loading, PHP card data, or Vue rendering.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo