Buildora is a Laravel package for building admin panels, resources, forms, datatables, widgets and actions — fully based on Eloquent models and a minimal amount of configuration.
- Laravel 10, 11 or 12
- PHP 8.1+
- Tailwind CSS (via CDN or Vite)
- Laravel Jetstream (optional)
- spatie/laravel-permission(recommended)
composer require ginkelsoft/buildoraIf you are using a local path-based package:
"repositories": [
  {
    "type": "path",
    "url": "packages/ginkelsoft/buildora",
    "options": {
      "symlink": true
    }
  }
]Then:
composer require ginkelsoft/buildora:*If Buildora provides configuration, you can publish it with:
php artisan vendor:publish --tag=buildora-configphp artisan buildora:installThis command will:
- Detect Laravel version
- Run migrations
- Add necessary traits to your User model
- Generate Buildora resources for all your models
- Generate permissions (if Spatie is installed)
- Create a default admin user
Generate a Buildora resource class based on an Eloquent model:
php artisan buildora:resource UserThis will create a file like:
app/Buildora/Resources/UserBuildora.php
You can customize fields, filters, actions, and views inside this class.
Create a dashboard widget:
php artisan buildora:widget StatsWidgetThis will generate:
- app/Buildora/Widgets/StatsWidget.php
Each widget implements a render() method and can return a Blade view or raw HTML.
Buildora supports multiple field types. Each field can be configured using a fluent API:
Examples:
TextField::make('name')->sortable()
EmailField::make('email')->readonly()
PasswordField::make('password')->hideFromIndex()
NumberField::make('price')->step(0.01)
CurrencyField::make('amount', '€')
DateTimeField::make('created_at')->readonly()
BelongsToField::make('company_id')->relation('company')You can add new field types by extending the Field base class and implementing the render() method.
Widgets can be used on dashboards or as panels on detail pages.
class TotalUsersWidget extends Widget
{
    public function render(): string
    {
        $count = User::count();
        return view('widgets.total-users', compact('count'))->render();
    }
}Widgets are registered in your resource via:
public function defineWidgets(): array
{
    return [
        TotalUsersWidget::make()->columnSpan(6),
    ];
}Panels are relation-based data sections shown on the detail page of a resource.
public function definePanels(): array
{
    return [
        Panel::relation('orders', OrderBuildora::class)->label('Recent Orders'),
        Panel::relation('invoices', InvoiceBuildora::class),
    ];
}This will show a datatable of related data on the detail page. Buildora automatically eager-loads these relations to prevent N+1 query issues.
Actions allow you to perform operations on individual records (RowAction) or multiple selected records (BulkAction).
Row actions appear on individual rows in datatables and detail pages:
public function defineRowActions(): array
{
    return [
        RowAction::make('Edit', 'fas fa-edit', 'route', 'buildora.edit')
            ->params(['resource' => 'user', 'id' => '{id}'])
            ->method('GET'),
        RowAction::make('Delete', 'fas fa-trash', 'route', 'buildora.destroy')
            ->params(['resource' => 'user', 'id' => '{id}'])
            ->method('DELETE')
            ->confirm('Are you sure you want to delete this record?'),
    ];
}Bulk actions allow operations on multiple selected records:
public function defineBulkActions(): array
{
    return [
        BulkAction::make('Delete Selected', 'buildora.bulk.delete')
            ->method('DELETE')
            ->confirm('Are you sure you want to delete the selected records?'),
        BulkAction::make('Export Selected', 'buildora.bulk.export')
            ->method('POST'),
    ];
}Buildora integrates with Spatie Laravel Permission for authorization. Permissions are automatically generated per resource.
# Generate permissions for all resources
php artisan buildora:generate-permissions
# Sync permissions (registers new permissions without deleting existing ones)
php artisan buildora:sync-permissions
# Grant all permissions to a specific user
php artisan buildora:grant-permissions {user_id}
# Create Permission resource for managing permissions in the UI
php artisan buildora:make-permission-resourcePermissions follow the format {resource}.{action}:
- user.view- View user listings
- user.create- Create new users
- user.edit- Edit existing users
- user.delete- Delete users
You can control access to actions using permissions:
RowAction::make('Delete', 'fas fa-trash', 'route', 'buildora.destroy')
    ->permission('user.delete');Configure global search behavior per resource:
public function searchResultConfig(): array
{
    return [
        'label' => fn($record) => $record->name,
        'columns' => ['name', 'email', 'created_at'],
    ];
}The label can be:
- A string (column name)
- An array of column names
- A callable that receives the record and returns a string
The main configuration file config/buildora.php contains:
'route_prefix' => 'buildora',  // Base URL path
'middleware' => ['web', 'buildora.auth', 'buildora.ensure-user-resource'],'models_namespace' => 'App\\Models\\','datatable' => [
    'pagination' => [10, 25, 50, 100, 250],
    'default_per_page' => 25,
],'files' => [
    'default_disk' => 'public',
    'default_path' => 'uploads',
    'max_upload_size_kb' => 2048,
    'previewable' => ['jpg', 'jpeg', 'png', 'pdf'],
],'dashboards' => [
    'enabled' => true,
    'label' => 'Dashboards',
    'icon' => 'fa fa-gauge',
    'children' => [
        'main' => [
            'label' => 'Main',
            'route' => 'buildora.dashboard',
            'params' => ['name' => 'main'],
            'permission' => 'dashboard.view',
            'widgets' => [],
        ],
    ],
],'navigation' => [
    [
        'label' => 'Settings',
        'icon' => 'fas fa-cog',
        'children' => [
            [
                'label' => 'Users',
                'icon' => 'fas fa-user',
                'route' => 'buildora.index',
                'params' => ['resource' => 'user'],
            ],
        ],
    ],
    'include_resources' => true, // Auto-include all resources
],# Installation and setup
php artisan buildora:install              # Interactive installer
# Resource generation
php artisan buildora:resource {Model}     # Generate resource from model
php artisan buildora:widget {Name}        # Generate widget
# Permission management
php artisan buildora:generate-permissions # Generate all resource permissions
php artisan buildora:sync-permissions     # Sync permissions
php artisan buildora:grant-permissions {user_id}  # Grant all permissions to user
php artisan buildora:make-permission-resource     # Create Permission resource
# User management
php artisan buildora:create-user          # Create admin userBuildora uses CSS variables for theming with support for light and dark mode.
php artisan vendor:publish --tag=buildora-themeThis will create resources/buildora/buildora-theme.css in your Laravel application.
Edit the published theme file to override CSS variables:
:root {
    /* Primary colors */
    --primary-rgb: 59, 130, 246;
    --primary-hover-rgb: 37, 99, 235;
    /* Background colors */
    --background-rgb: 255, 255, 255;
    --surface-rgb: 249, 250, 251;
    /* Text colors */
    --text-primary-rgb: 17, 24, 39;
    --text-secondary-rgb: 107, 114, 128;
    /* Border colors */
    --border-rgb: 229, 231, 235;
}
/* Dark mode */
.dark {
    --background-rgb: 17, 24, 39;
    --surface-rgb: 31, 41, 55;
    --text-primary-rgb: 243, 244, 246;
    --text-secondary-rgb: 156, 163, 175;
    --border-rgb: 55, 65, 81;
}The theme system uses RGB values to allow alpha transparency (e.g., rgba(var(--primary-rgb), 0.5)).
If you're developing the package itself, you can rebuild the assets:
# Development with hot reload
npm run dev
# Production build
npm run buildBuildora is open-source software licensed under the MIT license.