Fix annotations, remove groups
This commit is contained in:
parent
d3e12785bb
commit
aa7b062b29
3 changed files with 13 additions and 42 deletions
|
|
@ -15,19 +15,6 @@ class DataObjectServiceProvider extends ServiceProvider
|
|||
public function register(): void
|
||||
{
|
||||
$this->mergeConfigFrom(__DIR__ . '/config/dto.php', 'dto');
|
||||
|
||||
$registrar = new DataObjectRegistrar($this->app);
|
||||
|
||||
// Register from configured namespaces or manual class list
|
||||
$config = $this->getConfig();
|
||||
|
||||
if (!empty($config['classes'])) {
|
||||
// Manual registration (zero overhead)
|
||||
$registrar->registerMany($config['classes']);
|
||||
} elseif (!empty($config['namespaces'])) {
|
||||
// Automatic namespace scanning
|
||||
$registrar->registerFromNamespaces($config['namespaces']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -35,21 +22,6 @@ class DataObjectServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
// Commands will be registered here
|
||||
}
|
||||
|
||||
/**
|
||||
* Get DataObject configuration.
|
||||
*
|
||||
* @return array{namespaces: string[], classes: class-string[]}
|
||||
*/
|
||||
protected function getConfig(): array
|
||||
{
|
||||
return config('dataobject', [
|
||||
'namespaces' => [
|
||||
'App\DataObjects',
|
||||
],
|
||||
'classes' => [],
|
||||
]);
|
||||
//
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue