LaravelPackages.net
Acme Inc.
Toggle sidebar
reportei/laraground

Laravel components playground

5
0
About reportei/laraground

reportei/laraground is a Laravel package for laravel components playground. It currently has 0 GitHub stars and 5 downloads on Packagist. Install it with composer require reportei/laraground. Discover more Laravel packages by reportei or browse all Laravel packages to compare alternatives.

Last updated

Just add config in View Component Class

class Button extends Component
{
    ...
    protected $lgDesc = 'Form/Button';
    protected $lgView = 'components.form.button';
    
    ...
    public static function laraground()
    {
        return [
            'attributes' => [
                'label' => 'Button',
                'type' => 'button',
                'color' => 'primary',
                'size' => 'md',
            ],
            'slots' => [
                'slot' => 'label' // targint label attribute for control binds
            ],
            'model' => '' // wire:model when is input, select or textarea
                          // see https://laravel-livewire.com/docs/data-binding/
        ];
    }
}

Star History Chart