You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,13 @@ Service Interface .............. App\Services\User\UserServiceInterface
56
56
Service Implementation ......... App\Services\User\UserService
57
57
```
58
58
59
-
### Register Service Providers
59
+
## Important Note: Service Provider Registration
60
+
61
+
The service provider registration depends on your Laravel version and configuration:
62
+
63
+
### For Provider Binding Mode (Default - Works well on all Laravel versions)
64
+
65
+
If your `config/repository.php` has `'binding_mode' => 'provider'` (default), you **must** register the service providers.
60
66
61
67
Add the generated service providers to your `bootstrap/providers.php` (only once after running the first make repository command):
62
68
@@ -72,6 +78,19 @@ return [
72
78
];
73
79
```
74
80
81
+
### For Attribute Binding Mode (Laravel >= 12)
82
+
83
+
If your `config/repository.php` has `'binding_mode' => 'attribute'` and you're using **Laravel 12+**, you can skip the service provider registration entirely. The package will automatically register bindings using PHP attributes.
84
+
85
+
**Configuration Example:**
86
+
```php
87
+
// config/repository.php
88
+
return [
89
+
'binding_mode' => 'attribute', // Change to 'attribute' for Laravel 12+
0 commit comments