laravilt/core

Laravilt Core Package

Installs: 12

Dependents: 3

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/laravilt/core

v0.0.1 2025-11-12 16:16 UTC

This package is not auto-updated.

Last update: 2025-11-27 15:04:23 UTC


README

Core component system for Laravilt Framework providing the base Component class and ComponentRegistry.

Installation

composer require laravilt/core

Overview

The Core package provides:

  • Component: Abstract base class for all components
  • ComponentRegistry: Component registration and discovery system

Components serialize to both Vue/Inertia props and Flutter widget props automatically.

Quick Example

use Laravilt\Core\Component;

class TextInput extends Component
{
    protected function getVueComponent(): string
    {
        return 'TextInput';
    }

    protected function getVueProps(): array
    {
        return ['type' => 'text'];
    }

    protected function getFlutterWidget(): string
    {
        return 'LaraviltTextInput';
    }

    protected function getFlutterWidgetProps(): array
    {
        return ['inputType' => 'TextInputType.text'];
    }
}

// Usage
$field = TextInput::make('email')
    ->label('Email Address')
    ->columnSpan(2);

// Serialize for Vue
$vueProps = $field->toInertiaProps();

// Serialize for Flutter
$flutterProps = $field->toFlutterProps();

For complete documentation, see /docs/01-ARCHITECTURE/01-component-system.md.

Testing

composer test              # Run tests
composer test:coverage     # With coverage
composer test:types        # PHPStan analysis
composer test:style        # Code style check
composer format            # Auto-fix code style

Changelog

Please see CHANGELOG for more information.

Contributing

Please see CONTRIBUTING for details.

Security

Please review SECURITY for security issues.

License

The MIT License (MIT). Please see License File for more information.