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

Krait Laravel Package

mtrdesign/krait

Krait is a Laravel package from mtrdesign that provides lightweight, framework-native utilities and reusable components to reduce boilerplate and streamline common backend development tasks, helping teams build PHP applications faster with a simple, Laravel-friendly API.

View on GitHub
Deep Wiki
Context7

A Laravel & VueJS package for creating Ajax DataTables.

Frequently asked questions about Krait
How do I install and set up mtrdesign/krait in a Laravel application?
Install it with composer require mtrdesign/krait, then publish the package config. You extend the abstract server-side processor with your column definitions, register a JSON route for the endpoint, and drop the provided Vue component into your Blade or Vue view. If your stack already uses server-side DataTables, a single read-only table is a realistic same-day spike.
Which Laravel and PHP versions does Krait support?
Supported versions are not clearly spelled out in the public README excerpt, so verify against the package's composer.json constraints and any CI configuration before committing. The March 2025 release date should also be confirmed as a substantive release rather than a dependency constraint bump. Test on your target PHP 8.1+ and Laravel version as part of the spike.
Does Krait work with Vue 3 and Vite, or is it Vue 2 only?
The Vue half is the most likely friction point given the package's age profile and small footprint. Its assets may be Laravel Mix-era compiled bundles rather than Vite-compatible source, so check whether what ships is precompiled or raw source. If it is incompatible, keep the PHP processor and write your own Vue wrapper component instead.
How does Krait handle server-side search, ordering and pagination?
The abstract processor maps the DataTables Ajax protocol parameters, including draw, start, length, search, order and columns, onto Eloquent or query-builder state. You declare column definitions plus searchable and sortable flags per resource. Global search is LIKE-based and ordering follows client-supplied columns, so treat the generated queries as something to review rather than trust blindly.
Does Krait scope queries to the authenticated user or tenant automatically?
No. Scoping is left to the implementer, because the base class builds queries from request input. Server-side DataTables is a well-known footgun zone for unscoped queries, so you must explicitly verify that every processor is constrained to the current user or tenant. Never expose a processor over an unscoped query, especially in multi-tenant SaaS.
Can Krait search and sort across Eloquent relationships without N+1 queries?
Relation handling is part of the per-resource configuration, but searching across relations can easily produce N+1 queries. Aggregate count(*) cost and unindexed sorts are also your responsibility, not the package's. Benchmark against realistic table sizes in the 10k to 5M row range and add indexes before shipping.
Is Krait compatible with DataTables 1.x and DataTables 2.x?
DataTables 2.x changed client-side expectations, so a pinned and untested combination is a latent upgrade blocker. Confirm which DataTables version the bundled Vue components target and exercise your asset pipeline. If you replace the frontend component with your own, you regain full control over the DataTables version you run.
How do I replace the Krait Vue components with my own DataTable wrapper?
The PHP processor is portable and auditable, and most of the package's value lives in the request and response contract rather than the frontend. Keep the JSON endpoint and write a small Vue component that mounts DataTables.net in Ajax mode against it. Adopt the package behind your own DataTable interface so controllers never call it directly from many places.
Is mtrdesign/krait actively maintained, and what if it gets abandoned?
It is a single-vendor package from the mtrdesign agency with roughly 10 stars and essentially no independent production validation, so treat it as a code sample you may adopt rather than a dependency you inherit. The blast radius is low because it is MIT licensed and has a thin surface area. Plan to own an internal fork and check the maintainer of record plus issue and PR response history.
How does Krait compare to yajra/laravel-datatables or Livewire table packages?
Yajra/laravel-datatables is the far more established option for server-side DataTables in Laravel, while Livewire and Inertia-centric grids take a different architectural approach entirely. Krait's differentiator is shipping Vue components alongside the PHP processor. If you only need the backend, compare how much boilerplate each option actually removes for your column and relation definitions.
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