reportei / laraground
Laravel components playground
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:JavaScript
Requires
- php: ^7.2.5
- ext-json: *
- illuminate/console: ^7.0
- illuminate/filesystem: ^7.0
- illuminate/support: ^7.0
- laravel/framework: ^7.0
- livewire/livewire: ^1.3
This package is not auto-updated.
Last update: 2024-11-05 04:14:26 UTC
README
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/
];
}
}