Shadcn Theme Compatible • Admin Dashboard for Laravel 12

Tyro Dashboard
Beautiful Admin Panel

A modern, responsive admin dashboard for managing Tyro roles, privileges, users, and package settings. Built with beautiful UI, dark mode support, and complete CRUD operations for your Laravel 12 application.

composer require hasinhayder/tyro-dashboard
php artisan tyro-dashboard:install
Features

Everything You Need to Manage Your App

A comprehensive admin dashboard with all the tools to manage users, roles, privileges, and settings.

User Management

Complete CRUD operations for users. Create, edit, suspend, and manage user accounts with an intuitive interface.

Role Management

Full CRUD operations for roles. Create custom roles, assign privileges, and organize your access control system.

Privilege Management

Manage privileges and assign them to roles. Fine-grained access control for every feature of your application.

Settings Management

Configure Tyro and Tyro Login packages from a beautiful UI. No more digging through config files.

Profile Management

Users can update their own profile information. Self-service account management for all authenticated users.

Dark Mode

Built-in dark/light theme support. Beautiful in any lighting condition, easy on the eyes.

Responsive Design

Works perfectly on all device sizes. From mobile phones to large desktop monitors.

Admin-Only Access

Sensitive features are protected by role-based access. Only admins can manage users, roles, and privileges.

Admin Pages in Seconds

Generate complete admin pages with a single command. Automatic view creation, route registration, and sidebar linking. Build custom dashboards instantly.

Shadcn Theme Customization

Full shadcn/ui compatibility with visual theme editor support via tweakcn.com. Customize colors effortlessly.

Advanced Field Control

Fine-grained control with visibility options (hide_in_create, hide_in_edit), default values, placeholders, readonly fields, custom HTML attributes, and image preview for uploads.

User Management

Complete User Control

Manage your application's users with ease. Filter, search, and perform bulk actions from a centralized dashboard.

  • Advanced Filtering

    Filter users by role, status, or verification state instantly.

  • Bulk Actions

    Select multiple users to delete, suspend, or update in one go.

  • Profile Editing

    Update user details, roles, and permissions directly.

Role Management

Powerful Access Control

Define roles and assign permissions with granular precision. Secure your application with Tyro's robust RBAC system.

  • Role Hierarchy

    Create and manage roles with intuitive hierarchy support.

  • Permission Matrix

    Visualize and toggle permissions for each role easily.

  • Role Assignment

    Assign multiple roles to users for flexible access control.

Privilege Management

Fine-Grained Permissions

Control every aspect of your application's security. Define privileges and assign them to roles for complete coverage.

  • Route Discovery

    Automatically discover routes and create privileges with a single click.

  • Logical Grouping

    Group privileges by resource or module for better organization.

  • Descriptive Labels

    Add human-readable descriptions to every privilege.

Developer Experience

CRUD in Minutes, Not Hours

Add the HasCrud trait to any model and get a complete admin interface instantly. Just define your $fillable fields and Tyro handles everything else automatically.

1

Add HasCrud Trait

Add one line to your Eloquent model. Tyro auto-generates fields from your $fillable array and database schema.

2

Complete Admin Interface

Get full CRUD operations, search, pagination, validation, and relationship management without writing any controllers or views.

3

Optional Customization

Override auto-generated fields with $resourceFieldOverrides when needed. Everything is intelligently cached for performance.

// app/Models/Product.php
use HasinHayder\TyroDashboard\Concerns\HasCrud;

class Product extends Model
{
    use HasCrud; // ← Add this trait

    protected $fillable = [
        'name',
        'category',
        'price',
        'description',
        'is_active'
    ];

    // Optional: Customize specific fields
    protected $resourceFieldOverrides = [
        'price' => [
            'label' => 'Price (USD)',
            'default' => '0.00',
        ],
    ];
}
Zero-Config CRUD

Instant CRUD Operations

Add the HasCrud trait to any Eloquent model and get a complete admin interface automatically. No configuration files, no boilerplate - just one trait.

Auto-Generated Fields

Automatically detects database schema and generates appropriate form fields. Enum types become dropdowns, dates become date pickers, and more.

Relationship Detection

Automatically discovers model relationships (BelongsToMany, HasMany, etc.) and creates proper select fields for them.

Override Single Fields

Tweak specific fields exactly how you want them, while everything else auto-generates. The best of both worlds.

Role-Based Access

Control who can see and edit each resource. Define permissions right in your model with simple, powerful access rules.

Smart Defaults

Automatic validation rules, searchable/sortable flags, and help text support based on field names and database types.

Performance Optimized

Lightning-fast auto-generation with smart caching. Your dashboard stays snappy while staying perfectly in sync with your code.

Essential Field Support

Text, email, password, textarea, richtext, markdown, number, date, datetime, time, boolean, select, multiselect, radio, checkbox, and file fields ready to use.

Smart File Upload

Configure storage your way - local, S3, or any cloud. Files clean up automatically when records are deleted. One less thing to worry about.

One Trait, Complete CRUD Admin

Your Model

use HasinHayder\TyroDashboard\Concerns\HasCrud;

class Book extends Model
{
    use HasCrud; // <- This is where the magic happens

    protected $fillable = [
        'title',
        'isbn',
        'description',
        'price',
        'is_active',
    ];

    public function authors()
    {
        return $this->belongsToMany(
            Author::class
        );
    }
}

Optional Customization

protected $resourceFieldOverrides = [
    'isbn' => [
        'label' => 'ISBN Code',
        'help_text' => 'International ' .
                       'Standard Book Number',
    ],
    'description' => [
        'hide_in_index' => true,
    ],
    'price' => [
        'label' => 'Price (USD)',
    ],
];

// That's it! Everything else
// is auto-generated!

What You Get Automatically

List View

Searchable, sortable tables

Create Form

Auto-validated inputs

Edit Form

Pre-populated with data

Detail View

Full record display

Relationships

Multi-select for M2M

Access Control

Role-based visibility

File Uploads

Configurable storage disks

Rich Text & Markdown

Built-in editors

Field Visibility

hide_in_create, hide_in_edit, hide_in_index

Field Behavior

Default values, placeholders, readonly

Image Preview

Built-in upload image preview

Advanced Field Control

Complete Field Control

Fine-grained control over field behavior, visibility, and presentation with powerful configuration options.

Visibility Control

Hide fields in specific views with granular control:

  • hide_in_index - Hide from list view
  • hide_in_single_view - Hide from detail view
  • hide_in_create - Hide in create form
  • hide_in_edit - Hide in edit form

Field Behavior

Control how fields behave and display:

  • default - Set default values
  • placeholder - Add placeholder text
  • readonly - Make field read-only
  • attributes - Custom HTML attributes

Image Preview

Built-in image preview for file uploads:

  • display_image - Enable preview
  • display_image_position - Top or bottom

Automatically displays uploaded images at 200px width in edit forms.

Complete Field Configuration Example

Visibility & Behavior

'slug' => [
    'type' => 'text',
    'hide_in_create' => true, // Auto-generated
],
'status' => [
    'type' => 'text',
    'default' => 'draft',
    'placeholder' => 'Enter status',
],
'total' => [
    'type' => 'number',
    'readonly' => true, // Calculated field
],

Custom Attributes & Images

'bio' => [
    'type' => 'textarea',
    'attributes' => [
        'rows' => '10',
        'maxlength' => '500',
    ]
],
'avatar' => [
    'type' => 'file',
    'display_image' => true,
    'display_image_position' => 'top',
],

Why These Features Matter

1

Better UX

Hide unnecessary fields, show relevant information, and guide users with placeholders and defaults.

2

Cleaner Forms

Reduce form clutter by hiding auto-generated or computed fields while still tracking them.

3

Visual Feedback

Image previews let users see uploaded files instantly, improving confidence and reducing errors.

4

Full Control

Custom HTML attributes give you complete control over styling and JavaScript integration.

5

Faster Development

Spend less time writing custom field handling code. Configuration replaces boilerplate with simple array definitions.

6

Data Integrity

Readonly fields and smart defaults protect computed or system-generated data from accidental modification.

Quick Development

Instant Admin Pages

Generate complete dashboard pages with a single command. Perfect for building custom analytics, reports, settings, and management interfaces in seconds.

User Pages

For authenticated users

Create pages accessible to regular users. Perfect for dashboards, reports, analytics, and user-specific features.

tyro-dashboard:create-user-page
  • Auto-links in user sidebar
  • Auth middleware applied
  • User layout extended

Admin Pages

For administrators only

Create admin-only pages with role-based access. Ideal for system settings, logs, configurations, and management tools.

tyro-dashboard:create-admin-page
  • Auto-links in admin sidebar
  • Admin middleware protected
  • Admin layout extended

Common Pages

For all authenticated users

Create pages visible to both users and admins. Great for help centers, documentation, announcements, and shared resources.

tyro-dashboard:create-common-page
  • Links in both sidebars
  • Auth middleware only
  • Common layout extended

What Gets Created Automatically

Every command generates a complete, production-ready page with zero configuration

Blade View File

Complete template with layout

Route Registration

Added to web.php automatically

Sidebar Navigation

Link with icon added

Breadcrumb Trail

Navigation breadcrumbs included

Simple, Interactive, Powerful

Step 1
php artisan tyro-dashboard:create-user-page

Run the command - it prompts for the page name interactively

Step 2
Enter: "Sales Analytics"

Type your page name - it auto-generates slug and title

Done!
✓ Page created at resources/views/dashboard/sales-analytics.blade.php

Your page is ready to use with full navigation

Start building your custom dashboard now

Read Full Documentation

Page Removal Commands

Safely clean up pages you no longer need

Remove Admin Page

tyro-dashboard:remove-admin-page

Remove an admin-only page from dashboard

Remove User Page

tyro-dashboard:remove-user-page

Remove a user-facing page from dashboard

Remove Common Page

tyro-dashboard:remove-common-page

Remove a page from both user & admin sidebars

What Gets Removed

  • View file from resources/views/dashboard/
  • Route definition from routes/web.php
  • Sidebar navigation link(s) from the appropriate sidebar files
Safety First

All removal commands ask for confirmation before deleting files. You'll see what will be removed and can cancel if needed.

Theme System

shadcn/ui Compatible

Leverage the power of shadcn/ui design system. Complete theme control with CSS variables for perfect customization.

Standard CSS Variables

Full compatibility with shadcn/ui ecosystem. Use --primary, --secondary, --accent and more for consistent theming.

Dark & Light Modes

Automatic theme detection and manual switching. All components adapt seamlessly between modes.

Visual Theme Editor

Use tweakcn.com to customize colors visually and export directly.

Live Preview

Beautiful Admin Interface

Experience the modern, responsive design with seamless dark mode support. Every screen is crafted for optimal user experience.

Dashboard Landing
Profile Management
User Management
Edit User
Role Management
Create Role
Role Detail
Privilege Management
Create Privilege
Privilege Detail
Edit Privilege
Quick Start

Get Started in Minutes

Simple installation with an interactive wizard that guides you through the setup process.

1

Install the Package

Install Tyro Dashboard via Composer. Make sure you have Tyro already installed.

composer require hasinhayder/tyro-dashboard
2

Run the Installer

Run the interactive installer which will guide you through configuration options.

php artisan tyro-dashboard:install
3

Access the Dashboard

Navigate to /dashboard in your browser. Login with an admin account to access all features.

http://your-app.test/dashboard

Quick Setup

Start customizing in minutes, not hours

1

Publish Theme Files

php artisan tyro-dashboard:publish-style --theme-only
2

Customize Variables

Use tweakcn.com to create your palette and paste variables into shadcn-theme.blade.php.

1

Run Command

php artisan tyro-dashboard:createsuperuser
2

Interactive Setup

Follow the interactive prompts to set your email, name, and password for the superuser account.

1

Create Admin Page

php artisan tyro-dashboard:create-admin-page "Settings"
2

What happens next

This command automatically creates the view file, registers the route, and adds it to the admin sidebar.

Read full documentation
Routes

Available Routes

All routes provided by Tyro Dashboard and their access levels.

Route Description Access
/dashboard Main dashboard home page All Authenticated
/dashboard/profile User profile settings All Authenticated
/dashboard/users User management list Admin Only
/dashboard/users/create Create new user Admin Only
/dashboard/users/{id}/edit Edit user details Admin Only
/dashboard/roles Role management list Admin Only
/dashboard/roles/create Create new role Admin Only
/dashboard/roles/{id} View role details Admin Only
/dashboard/privileges Privilege management list Admin Only
/dashboard/privileges/create Create new privilege Admin Only
/dashboard/settings/tyro Tyro package settings Admin Only
/dashboard/settings/tyro-login Tyro Login package settings Admin Only
Security

Security Features

Enterprise-grade security with role-based access control, protected resources, and comprehensive authentication features.

Role-Based Access Control

Complete RBAC system with admin, super-admin, and custom roles. Fine-grained permissions control who can access what.

RBAC Custom Roles

Protected Core Roles

System roles like admin, super-admin, and user are protected from accidental deletion, ensuring system stability.

Safe Locked

Privilege Management

Granular privilege system with assign/detach capabilities. Create custom privileges for specific features and actions.

Granular Flexible

Authentication Middleware

Built on Laravel's authentication system with middleware protection for all dashboard routes and admin-only areas.

Middleware Protected

Secure Session Management

Laravel's secure session handling with CSRF protection on all forms and automatic session timeout configuration.

CSRF Sessions

Readonly Resources

Mark resources as readonly for specific roles to prevent unauthorized modifications while maintaining visibility.

Read-Only Safe Mode

Secure File Uploads

Configurable file upload validation with type restrictions, size limits, and secure storage on public or private disks.

Validated Secure

User Suspension

Admins can suspend user accounts to immediately revoke access without permanently deleting user data or history.

Account Control Revocable

Validation & Error Handling

Comprehensive server-side validation for all forms with configurable error visibility and user-friendly error messages.

Validated Protected
FAQ

Frequently Asked Questions

Common questions about Tyro Dashboard.

Tyro Dashboard requires PHP 8.2+, Laravel 12.x, and the hasinhayder/tyro package (^1.0). The hasinhayder/tyro-login package is optional but recommended for the complete authentication experience.
Yes! You can publish the views using php artisan vendor:publish --tag=tyro-dashboard-views. This will copy all views to resources/views/vendor/tyro-dashboard/ where you can modify them.
Set the TYRO_DASHBOARD_PREFIX environment variable in your .env file. For example, TYRO_DASHBOARD_PREFIX=admin will make the dashboard available at /admin.
By default, users with admin or super-admin roles have full admin access. You can customize this by modifying the admin_roles array in config/tyro-dashboard.php.
Yes! Set TYRO_DASHBOARD_APP_NAME and TYRO_DASHBOARD_LOGO in your .env file to customize the application name and logo that appears in the dashboard.
Yes! Tyro Dashboard works with Tyro alone. The Tyro Login package is optional but recommended for a complete authentication experience. The dashboard's Tyro Login settings page will only appear if the package is installed.
Under 5 minutes! Just run composer require hasinhayder/tyro-dashboard and php artisan tyro-dashboard:install. Your admin dashboard will be ready at /dashboard.
Yes! Tyro Dashboard uses shadcn/ui CSS variables and is fully compatible with tweakcn.com for visual theme editing. Perfect for shadcn-based projects.
It provides a complete, ready-to-use admin interface that integrates seamlessly with Tyro RBAC. No frontend development needed - just install and configure. Beautiful dark/light themes included.
Yes, completely free! Tyro Dashboard is open-source software with no hidden fees or premium tiers. You can use it, modify it, and contribute to its development at no cost.

Ready to Build Your Admin Dashboard?

Get Tyro Dashboard today and have a beautiful, functional admin panel in minutes.