PHPackages                             rosiumdata/laravel - 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. rosiumdata/laravel

ActiveLibrary

rosiumdata/laravel
==================

RosiumData Laravel integration — one class, one Blade tag

v0.1.0(today)12↑2900%MITPHPPHP ^8.1

Since Jul 27Pushed todayCompare

[ Source](https://github.com/Rosembergg/rosiumdata-laravel)[ Packagist](https://packagist.org/packages/rosiumdata/laravel)[ RSS](/packages/rosiumdata-laravel/feed)WikiDiscussions main Synced today

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

rosiumdata/laravel
==================

[](#rosiumdatalaravel)

 RosiumData for Laravel — one class, one Blade tag. Zero JavaScript.

 [![PHP](https://camo.githubusercontent.com/e22fd7d5afc79761a72f73c287aef0beee47c05b093029801b916ed26e9c8416/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d5e382e312d626c7565)](https://camo.githubusercontent.com/e22fd7d5afc79761a72f73c287aef0beee47c05b093029801b916ed26e9c8416/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d5e382e312d626c7565) [![Laravel](https://camo.githubusercontent.com/c2764eed5e2ad815016af9548980c08e96018df9edcbc83efeeab971d286c6cb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d5e31302e307c5e31312e302d726564)](https://camo.githubusercontent.com/c2764eed5e2ad815016af9548980c08e96018df9edcbc83efeeab971d286c6cb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d5e31302e307c5e31312e302d726564) [![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)

---

What is it?
-----------

[](#what-is-it)

A Laravel package that eliminates all the boilerplate of using RosiumData in Blade. Define your table in **one PHP class** and use it with **one Blade tag.** No JavaScript. No controllers. No manual routes.

```
// app/RosiumTables/ProdutosTable.php
class ProdutosTable extends RosiumTable
{
    public function query(): Builder
    {
        return Produto::query();
    }

    public function columns(): array
    {
        return [
            Column::make('id', 'number')->label('ID'),
            Column::make('nome', 'text')->label('Produto'),
            Column::make('preco', 'number')
                ->label('Preço')
                ->mask('R$ #,##0.00'),
            Column::make('status', 'select')
                ->label('Status')
                ->options([1 => 'Ativo', 2 => 'Inativo']),
        ];
    }
}
```

```

```

**That's it.** Filters, sorting, pagination, and action buttons — all working. Zero JavaScript.

---

Why it exists
-------------

[](#why-it-exists)

Using RosiumData in Laravel Blade typically requires writing:

- A controller (50 lines of filter/sort/paginate logic)
- A route (manual registration)
- A JavaScript file (`tables/produtos.js` with columns + adapter config)
- An `app.js` import
- A Blade tag

This package reduces all of that to **one PHP class + one Blade tag.**

It's the same experience as PowerGrid — but without Livewire. The table is a native Web Component (``) that runs in the browser. No server round-trips for rendering.

---

Installation
------------

[](#installation)

```
composer require rosiumdata/laravel
npm install rosiumdata
```

Add to your Blade layout:

```
@vite(['resources/css/app.css', 'resources/js/app.js'])
```

Register the Web Component in `resources/js/app.js`:

```
import '@rosiumdata/vanilla'
import '@rosiumdata/vanilla/theme/default.css'
import './rosium-init'
```

---

Quick start
-----------

[](#quick-start)

### 1. Create your first table

[](#1-create-your-first-table)

```
php artisan make:rosium-table Produtos --model=Produto
```

This creates:

- `app/RosiumTables/ProdutosTable.php` — your table class
- `resources/js/rosium/produtos.js` — auto-generated JS (never edit manually)
- Reads your database schema and pre-fills column types

### 2. Edit the table class

[](#2-edit-the-table-class)

```
// app/RosiumTables/ProdutosTable.php
public function query(): Builder
{
    return Produto::query()
        ->select(['produtos.*', 'categorias.nome as categoria_nome'])
        ->leftJoin('categorias', 'categorias.id', '=', 'produtos.categoria_id');
}

public function columns(): array
{
    return [
        Column::make('id', 'number')->label('ID'),
        Column::make('nome', 'text')->label('Produto')->sortable(),
        Column::make('categoria_nome', 'text')->label('Categoria'),
        Column::make('preco', 'number')
            ->label('Preço')
            ->mask('R$ #,##0.00'),
        Column::make('estoque', 'number')->label('Estoque'),
        Column::make('status', 'select')
            ->label('Status')
            ->options([1 => 'Ativo', 2 => 'Inativo', 3 => 'Pendente']),
        Column::make('criado_em', 'date')->label('Data'),
        ActionColumn::make('acoes', [
            ['key' => 'editar', 'label' => 'Editar'],
            ['key' => 'excluir', 'label' => 'Excluir', 'danger' => true],
        ]),
    ];
}
```

### 3. Use in Blade

[](#3-use-in-blade)

```

```

---

How it works
------------

[](#how-it-works)

```
┌─ Browser ────────────────────────────────────┐
│                                                │
│              │
│         │                                      │
│         ▼                                      │
│  @rosiumdata/vanilla (Web Component)           │
│         │                                      │
│         ▼                                      │
│  @rosiumdata/core (Data Engine)               │
│         │                                      │
│         ▼                                      │
│  LaravelAdapter.fetch()                        │
│         │                                      │
└─────────┼──────────────────────────────────────┘
          │
          ▼
┌─ Laravel ─────────────────────────────────────┐
│                                                │
│  GET /rosium-data/produtos                    │
│         │                                      │
│         ▼                                      │
│  RosiumTableController (auto-generated)       │
│         │                                      │
│         ▼                                      │
│  ProdutosTable::query() (YOUR code)           │
│         │                                      │
│         ▼                                      │
│  { data: [...], meta: { total: N } }          │
│                                                │
└────────────────────────────────────────────────┘

```

**The controller is generic.** One controller handles ALL tables. You never write a controller. You never register a route. You define `query()` and `columns()` — the package does the rest.

---

Key features
------------

[](#key-features)

### 🧩 Eloquent-first

[](#-eloquent-first)

Your `query()` returns a `Builder`. Use `select()`, `join()`, `leftJoin()`, `where()`, subqueries — anything Eloquent supports.

### 🔌 Automatic API

[](#-automatic-api)

Every table gets a `GET /rosium-data/{table}` endpoint automatically. Filters, sorting, and pagination are applied on top of your query. Zero manual wiring.

### 📦 Schema auto-detection

[](#-schema-auto-detection)

`php artisan make:rosium-table Produtos --model=Produto` reads your database columns and pre-fills types, labels, and masks. No guesswork.

### 🚨 Error-safe

[](#-error-safe)

Invalid filters (column that doesn't exist, malformed value) are silently ignored instead of throwing SQL exceptions. The controller wraps everything in try/catch.

### 🎨 Same theme as Nuxt

[](#-same-theme-as-nuxt)

The Web Component uses the same CSS variables (`--rosium-*`) and classes (`.rosium-*`) as the Nuxt renderer. Same visual identity everywhere.

---

Column types
------------

[](#column-types)

TypeFilterWhat it rendersOptions`text`contains, equals, starts with, ends with``—`number`=, &gt;, &lt;, &gt;=, &lt;=, between`` (min + max)—`date`between, before, after, equals`` (start + end)—`datetime`same as date``—`boolean`equals`` (Yes/No)—`select`equals`` (dropdown)`options([1 => 'Ativo', 2 => 'Inativo'])``action`—Button or ⋯ menu`ActionColumn::make('key', [...])`---

Actions (buttons)
-----------------

[](#actions-buttons)

Actions are **triggers, never executors.** The Web Component emits a `detail` event with `{ key, row }` — you decide what to do:

```
document.getElementById('rosium-table-produtos')
  .addEventListener('action', (event) => {
    const { key, row } = event.detail
    if (key === 'editar') {
      window.location.href = `/produtos/${row.raw.id}/editar`
    }
    if (key === 'excluir' && confirm('Excluir?')) {
      fetch(`/api/produtos/${row.raw.id}`, { method: 'DELETE' })
    }
  })
```

---

Configuration
-------------

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=rosiumdata-config
```

`config/rosiumdata.php`:

```
return [
    'path' => app_path('RosiumTables'),
    'js_path' => resource_path('js/rosium'),
    'route_prefix' => 'rosium-data',
    'middleware' => ['api'],
];
```

---

Commands
--------

[](#commands)

CommandWhat it does`make:rosium-table {name} --model={model}`Create table class, detect schema, generate JS`rosium:generate-js`Regenerate all JS files from PHP classes---

Documentation
-------------

[](#documentation)

DocumentWhat it covers[USAGE.md](docs/USAGE.md)Complete API reference — `RosiumTable`, `Column`, `ActionColumn`, controller[INSTALLATION.md](docs/INSTALLATION.md)Step-by-step setup, requirements, troubleshooting---

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10 or 11
- npm package `rosiumdata` (installs `@rosiumdata/vanilla` Web Component)
- Database with Eloquent models

---

License
-------

[](#license)

MIT

---

Related
-------

[](#related)

- [RosiumData Core](https://github.com/Rosembergg/RSdata) — the headless engine
- [RosiumData npm](https://www.npmjs.com/package/rosiumdata) — JavaScript packages

---

 Built for Laravel developers who want the PowerGrid experience — without the Livewire dependency.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance100

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/60368472?v=4)[Rosemberg ](/maintainers/Rosembergg)[@Rosembergg](https://github.com/Rosembergg)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/rosiumdata-laravel/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M348](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M134](/packages/roots-acorn)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M250](/packages/laravel-ai)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77922.3M186](/packages/laravel-mcp)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k96.5k1](/packages/mike-bronner-laravel-model-caching)

PHPackages © 2026

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