-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrepomix-output.xml
More file actions
11509 lines (9669 loc) · 306 KB
/
Copy pathrepomix-output.xml
File metadata and controls
11509 lines (9669 loc) · 306 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
This file is a merged representation of a subset of the codebase, containing files not matching ignore patterns, combined into a single document by Repomix.
<file_summary>
This section contains a summary of this file.
<purpose>
This file contains a packed representation of the entire repository's contents.
It is designed to be easily consumable by AI systems for analysis, code review,
or other automated processes.
</purpose>
<file_format>
The content is organized as follows:
1. This summary section
2. Repository information
3. Directory structure
4. Repository files (if enabled)
5. Multiple file entries, each consisting of:
- File path as an attribute
- Full contents of the file
</file_format>
<usage_guidelines>
- This file should be treated as read-only. Any changes should be made to the
original repository files, not this packed version.
- When processing this file, use the file path to distinguish
between different files in the repository.
- Be aware that this file may contain sensitive information. Handle it with
the same level of security as you would the original repository.
</usage_guidelines>
<notes>
- Some files may have been excluded based on .gitignore rules and Repomix's configuration
- Binary files are not included in this packed representation. Please refer to the Repository Structure section for a complete list of file paths, including binary files
- Files matching these patterns are excluded: **/*.log, tmp/, .js, .html, .blade.php, .css, public/, vendor/, node_modules, venv/, logs/, electorn-sentinerl/
- Files matching patterns in .gitignore are excluded
- Files matching default ignore patterns are excluded
- Files are sorted by Git change count (files with more changes are at the bottom)
</notes>
</file_summary>
<directory_structure>
.github/
ISSUE_TEMPLATE/
bug.yml
config.yml
workflows/
dependabot-auto-merge.yml
fix-php-code-styling.yml
publish.yml
tests.yml
CONTRIBUTING.md
dependabot.yml
FUNDING.yml
SECURITY.md
config/
laravilt-support.php
docs/
index.md
mcp-server.md
lang/
ar/
support.php
en/
support.php
resources/
css/
app.css
laravilt-core.css
js/
components/
ui/
alert/
Alert.vue
AlertDescription.vue
AlertTitle.vue
index.ts
avatar/
Avatar.vue
AvatarFallback.vue
AvatarImage.vue
index.ts
badge/
Badge.vue
index.ts
breadcrumb/
Breadcrumb.vue
BreadcrumbEllipsis.vue
BreadcrumbItem.vue
BreadcrumbLink.vue
BreadcrumbList.vue
BreadcrumbPage.vue
BreadcrumbSeparator.vue
index.ts
button/
Button.vue
index.ts
card/
Card.vue
CardAction.vue
CardContent.vue
CardDescription.vue
CardFooter.vue
CardHeader.vue
CardTitle.vue
index.ts
checkbox/
Checkbox.vue
index.ts
collapsible/
Collapsible.vue
CollapsibleContent.vue
CollapsibleTrigger.vue
index.ts
dialog/
Dialog.vue
DialogClose.vue
DialogContent.vue
DialogDescription.vue
DialogFooter.vue
DialogHeader.vue
DialogOverlay.vue
DialogScrollContent.vue
DialogTitle.vue
DialogTrigger.vue
index.ts
dropdown-menu/
DropdownMenu.vue
DropdownMenuCheckboxItem.vue
DropdownMenuContent.vue
DropdownMenuGroup.vue
DropdownMenuItem.vue
DropdownMenuLabel.vue
DropdownMenuRadioGroup.vue
DropdownMenuRadioItem.vue
DropdownMenuSeparator.vue
DropdownMenuShortcut.vue
DropdownMenuSub.vue
DropdownMenuSubContent.vue
DropdownMenuSubTrigger.vue
DropdownMenuTrigger.vue
index.ts
input/
index.ts
Input.vue
label/
index.ts
Label.vue
navigation-menu/
index.ts
NavigationMenu.vue
NavigationMenuContent.vue
NavigationMenuIndicator.vue
NavigationMenuItem.vue
NavigationMenuLink.vue
NavigationMenuList.vue
NavigationMenuTrigger.vue
NavigationMenuViewport.vue
pin-input/
index.ts
PinInput.vue
PinInputGroup.vue
PinInputSeparator.vue
PinInputSlot.vue
popover/
index.ts
Popover.vue
PopoverContent.vue
PopoverTrigger.vue
radio-group/
index.ts
RadioGroup.vue
RadioGroupItem.vue
separator/
index.ts
Separator.vue
sheet/
index.ts
Sheet.vue
SheetClose.vue
SheetContent.vue
SheetDescription.vue
SheetFooter.vue
SheetHeader.vue
SheetOverlay.vue
SheetTitle.vue
SheetTrigger.vue
sidebar/
index.ts
Sidebar.vue
SidebarContent.vue
SidebarFooter.vue
SidebarGroup.vue
SidebarGroupAction.vue
SidebarGroupContent.vue
SidebarGroupLabel.vue
SidebarHeader.vue
SidebarInput.vue
SidebarInset.vue
SidebarMenu.vue
SidebarMenuAction.vue
SidebarMenuBadge.vue
SidebarMenuButton.vue
SidebarMenuButtonChild.vue
SidebarMenuItem.vue
SidebarMenuSkeleton.vue
SidebarMenuSub.vue
SidebarMenuSubButton.vue
SidebarMenuSubItem.vue
SidebarProvider.vue
SidebarRail.vue
SidebarSeparator.vue
SidebarTrigger.vue
utils.ts
skeleton/
index.ts
Skeleton.vue
spinner/
index.ts
Spinner.vue
switch/
index.ts
Switch.vue
tabs/
index.ts
Tabs.vue
TabsContent.vue
TabsList.vue
TabsTrigger.vue
textarea/
index.ts
Textarea.vue
tooltip/
index.ts
Tooltip.vue
TooltipContent.vue
TooltipProvider.vue
TooltipTrigger.vue
index.ts
Tabs.vue
TabsContent.vue
TabsList.vue
TabsTrigger.vue
ComponentRenderer.vue
Link.vue
Modal.vue
Render.vue
ServerError.vue
composables/
index.ts
useLocalization.ts
core/
Laravilt.js
LaraviltApp.vue
LaraviltPlugin.js
LaraviltProgress.js
lib/
utils.ts
mixins/
component-mixin.js
utils/
event-bus.js
navigate.js
serializer.js
laravilt-core.js
lang/
ar/
support.php
en/
support.php
views/
laravilt-core/
components/
component.blade.php
link.blade.php
modal.blade.php
vue-component.blade.php
app.blade.php
src/
Colors/
Color.php
Commands/
InstallSupportCommand.php
MakeComponentCommand.php
Concerns/
CanBeDisabled.php
CanBeReadonly.php
CanBeRequired.php
EvaluatesClosures.php
HasColumnSpan.php
HasHelperText.php
HasId.php
HasLabel.php
HasPlaceholder.php
HasVisibility.php
InteractsWithState.php
Contracts/
Buildable.php
FlutterSerializable.php
HasLabel.php
HasState.php
InertiaSerializable.php
Serializable.php
Enums/
ImageSize.php
Facades/
Laravilt.php
LaraviltCore/
Blade/
Components/
Component.php
Link.php
Modal.php
VueComponent.php
Bridge/
ComponentSerializer.php
RequestHandler.php
Http/
Controllers/
LaraviltController.php
Middleware/
LaraviltMiddleware.php
LaraviltCore.php
LaraviltServiceProvider.php
Mcp/
Tools/
GenerateComponentTool.php
SearchDocsTool.php
LaraviltSupportServer.php
Utilities/
Get.php
Set.php
Translator.php
Component.php
SupportServiceProvider.php
tests/
Feature/
DebugTest.php
Unit/
Concerns/
CanBeDisabledTest.php
CanBeReadonlyTest.php
CanBeRequiredTest.php
EvaluatesClosuresTest.php
HasVisibilityTest.php
InteractsWithStateTest.php
ComponentTest.php
views/
test-view.blade.php
Pest.php
TestCase.php
.gitignore
.npmignore
.npmrc
CHANGELOG.md
CODE_OF_CONDUCT.md
composer.json
LICENSE.md
package.json
phpstan.neon
phpunit.xml
pint.json
README.md
testbench.yaml
vite.config.ts
vite.plugin.js
</directory_structure>
<files>
This section contains the contents of the repository's files.
<file path=".github/ISSUE_TEMPLATE/bug.yml">
name: Bug Report
description: Report a bug
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of the bug
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Go to '...'
2. Click on '....'
3. See error
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What you expected to happen
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual Behavior
description: What actually happened
validations:
required: true
- type: input
id: version
attributes:
label: Package Version
description: What version of the package are you using?
validations:
required: true
- type: input
id: php-version
attributes:
label: PHP Version
description: What version of PHP are you using?
validations:
required: true
- type: input
id: laravel-version
attributes:
label: Laravel Version
description: What version of Laravel are you using?
validations:
required: true
</file>
<file path=".github/ISSUE_TEMPLATE/config.yml">
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/laravilt/support/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/laravilt/support/discussions/new?category=ideas
about: Share ideas for new features
</file>
<file path=".github/workflows/dependabot-auto-merge.yml">
name: Dependabot Auto-Merge
on: [push, pull_request]
permissions:
pull-requests: write
contents: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Auto-merge Dependabot PRs for semver-minor updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Auto-merge Dependabot PRs for semver-patch updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
</file>
<file path=".github/CONTRIBUTING.md">
# Contributing to Support
Thank you for considering contributing to Support!
## Pull Requests
1. Fork the repository
2. Create a new branch for your feature
3. Write tests for your changes
4. Ensure all tests pass
5. Submit a pull request
## Coding Standards
- Follow PSR-12 coding standards
- Run `composer format` before committing
- Write tests for new features
- Ensure PHPStan passes with level 5
## Running Tests
```bash
composer test
```
## Code Style
```bash
composer format
```
## Static Analysis
```bash
composer analyse
```
</file>
<file path=".github/dependabot.yml">
version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
</file>
<file path=".github/FUNDING.yml">
github: fadymondy
</file>
<file path=".github/SECURITY.md">
# Security Policy
## Reporting a Vulnerability
If you discover a security vulnerability within Support, please send an email to info@3x1.io. All security vulnerabilities will be promptly addressed.
Please do not publicly disclose the issue until it has been addressed by the team.
</file>
<file path="config/laravilt-support.php">
<?php
return [
/*
|--------------------------------------------------------------------------
| Plugin Settings
|--------------------------------------------------------------------------
|
| Configure your plugin settings here.
|
*/
'enabled' => env('LARAVILT_SUPPORT_ENABLED', true),
// Add your configuration options here
];
</file>
<file path="docs/index.md">
# Laravilt Support Documentation
Foundation package providing base components, utilities, and contracts for all Laravilt packages.
## Table of Contents
1. [Getting Started](#getting-started)
2. [Architecture](#architecture)
3. [Base Component](#base-component)
4. [Concerns](#concerns)
5. [Utilities](#utilities)
6. [Contracts](#contracts)
7. [API Reference](#api-reference)
8. [MCP Server Integration](mcp-server.md)
## Overview
Laravilt Support is the foundation package that provides:
- **Base Component Class**: Foundation for all UI components
- **Concerns (Traits)**: Reusable component behaviors
- **Utilities**: Helper classes for common operations
- **Contracts**: Interfaces for consistent implementations
- **Laravilt Core**: Central configuration and state management
- **Serialization**: Multi-platform data serialization (Laravilt, API, Flutter)
## Key Features
### 🏗️ Base Component
- Factory pattern via `make()`
- Multi-platform serialization
- RTL/LTR support
- Theme support
- Visibility control
- State management
### 🎨 Concerns (Traits)
- `CanBeDisabled`: Disable components
- `CanBeHidden`: Hide components conditionally
- `CanBeReadonly`: Make components readonly
- `CanBeRequired`: Mark components as required
- `EvaluatesClosures`: Evaluate closures with context
- `HasColumnSpan`: Grid column spanning
- `HasHelperText`: Helper text support
- `HasId`: Unique identifiers
- `HasLabel`: Labels and descriptions
- `HasPlaceholder`: Placeholder text
- `HasState`: Component state management
- `HasVisibility`: Conditional visibility
- `InteractsWithState`: State interaction utilities
### 🛠️ Utilities
- **Get**: Retrieve field values from state
- **Set**: Update field values in state
- **Str**: String manipulation helpers
- **Arr**: Array manipulation helpers
### 📝 Contracts
- `Buildable`: Components that can be built
- `Serializable`: Components that can be serialized
- `InertiaSerializable`: Components for Inertia.js
- `HasSchema`: Components with nested schemas
## System Requirements
- PHP 8.3+
- Laravel 12+
## Installation
```bash
composer require laravilt/support
```
The service provider is auto-discovered and will register automatically.
## Base Component
All Laravilt components extend the base `Component` class:
```php
use Laravilt\Support\Component;
class CustomField extends Component
{
protected string $view = 'laravilt-custom::field';
protected function setUp(): void
{
parent::setUp();
// Initialize component here
}
public function toLaraviltProps(): array
{
return array_merge(parent::toLaraviltProps(), [
'customProperty' => $this->getCustomProperty(),
]);
}
}
```
### Creating Components
```php
$component = CustomField::make('field_name')
->label('Field Label')
->placeholder('Enter value')
->required()
->helperText('This is a helpful hint')
->disabled(false)
->visible(true);
```
## Concerns (Traits)
### CanBeDisabled
```php
use Laravilt\Support\Concerns\CanBeDisabled;
class CustomComponent extends Component
{
use CanBeDisabled;
}
// Usage
$component->disabled(true);
$component->disabled(fn ($record) => $record->is_locked);
```
### CanBeHidden
```php
use Laravilt\Support\Concerns\CanBeHidden;
class CustomComponent extends Component
{
use CanBeHidden;
}
// Usage
$component->hidden(true);
$component->hidden(fn ($record) => $record->is_archived);
```
### HasVisibility
```php
use Laravilt\Support\Concerns\HasVisibility;
class CustomComponent extends Component
{
use HasVisibility;
}
// Usage
$component->visible(true);
$component->visible(fn (Get $get) => $get('show_advanced') === true);
```
### EvaluatesClosures
```php
use Laravilt\Support\Concerns\EvaluatesClosures;
class CustomComponent extends Component
{
use EvaluatesClosures;
public function process($value)
{
// Evaluates closures with automatic dependency injection
return $this->evaluate($value, [
'record' => $this->getRecord(),
'data' => $this->getData(),
]);
}
}
```
### HasColumnSpan
```php
use Laravilt\Support\Concerns\HasColumnSpan;
class CustomComponent extends Component
{
use HasColumnSpan;
}
// Usage
$component->columnSpan(2); // Span 2 columns
$component->columnSpan('full'); // Full width
$component->columnSpan([
'default' => 1,
'sm' => 2,
'lg' => 3,
]); // Responsive
```
### HasState
```php
use Laravilt\Support\Concerns\HasState;
class CustomComponent extends Component
{
use HasState;
}
// Usage
$component->default('default value');
$component->afterStateUpdated(function ($value, Set $set) {
$set('related_field', $value * 2);
});
$component->live(); // Make field reactive
```
## Utilities
### Get Utility
Retrieve field values from state:
```php
use Laravilt\Support\Utilities\Get;
$component->visible(fn (Get $get) => {
return $get('country') === 'US';
});
// Get nested values
$get('address.city');
// Get with default
$get('optional_field', 'default');
```
### Set Utility
Update field values in state:
```php
use Laravilt\Support\Utilities\Set;
$component->afterStateUpdated(function ($value, Set $set) {
// Set single value
$set('related_field', $value * 2);
// Set nested value
$set('address.city', 'New York');
// Set multiple values
$set([
'field1' => 'value1',
'field2' => 'value2',
]);
});
```
### Evaluation Context
Components support evaluation context for dynamic behavior:
```php
use Laravilt\Support\Utilities\Get;
use Laravilt\Support\Utilities\Set;
$component
->visible(fn (Get $get) => $get('show_field') === true)
->default(fn (Get $get) => $get('other_field') * 2)
->afterStateUpdated(function ($value, Set $set, Get $get) {
if ($value > 100) {
$set('warning', 'Value is high');
}
});
```
## Serialization
### Laravilt Props (Inertia)
```php
$component->toLaraviltProps();
```
Returns data formatted for Laravilt/Inertia.js Vue components.
### API Serialization
```php
$component->toApiResponse();
```
Returns data formatted for REST APIs.
### Flutter Serialization
```php
$component->toFlutterProps();
```
Returns data formatted for Flutter mobile apps.
## Contracts
### Buildable
```php
interface Buildable
{
public static function make(string $name): static;
}
```
### Serializable
```php
interface Serializable
{
public function toLaraviltProps(): array;
public function toApiResponse(): array;
public function toFlutterProps(): array;
}
```
### InertiaSerializable
```php
interface InertiaSerializable
{
public function toInertiaProps(): array;
}
```
### HasSchema
```php
interface HasSchema
{
public function schema(array $components): static;
public function getSchema(): array;
}
```
## Creating Custom Components
### Step 1: Create Component Class
```php
<?php
namespace App\Forms\Components;
use Laravilt\Support\Component;
use Laravilt\Support\Concerns\CanBeDisabled;
use Laravilt\Support\Concerns\CanBeRequired;
use Laravilt\Support\Concerns\HasLabel;
use Laravilt\Support\Concerns\HasState;
class RatingInput extends Component
{
use CanBeDisabled;
use CanBeRequired;
use HasLabel;
use HasState;
protected string $view = 'forms.components.rating-input';
protected int $maxRating = 5;
protected ?string $icon = 'star';
protected ?string $color = 'warning';
public function maxRating(int $max): static
{
$this->maxRating = $max;
return $this;
}
public function icon(string $icon): static
{
$this->icon = $icon;
return $this;
}
public function color(string $color): static
{
$this->color = $color;
return $this;
}
public function toLaraviltProps(): array
{
return array_merge(parent::toLaraviltProps(), [
'maxRating' => $this->maxRating,
'icon' => $this->icon,
'color' => $this->color,
]);
}
}
```
### Step 2: Use Custom Component
```php
use App\Forms\Components\RatingInput;
RatingInput::make('rating')
->label('Rate this product')
->maxRating(5)
->icon('star')
->color('warning')
->required();
```
## Generator Command
```bash
# Generate a custom component
php artisan make:component RatingInput
# Force overwrite existing file
php artisan make:component RatingInput --force
```
## Best Practices
1. **Extend Base Component**: Always extend `Laravilt\Support\Component`