add swiftpayments from old source
This commit is contained in:
@@ -27,5 +27,27 @@ class AppServiceProvider extends ServiceProvider
|
||||
events: ['eloquent.created: *', 'eloquent.updated: *', 'eloquent.deleted: *'],
|
||||
listener: fn (string $eventName, array $data) => storeResourceEvent($eventName, $data, request())
|
||||
);
|
||||
|
||||
$this->loadMigrationsFrom($this->findModuleMigrations());
|
||||
}
|
||||
|
||||
/**
|
||||
* Find Module migrations
|
||||
*
|
||||
* @return array<int, string>
|
||||
*/
|
||||
public function findModuleMigrations(): array
|
||||
{
|
||||
/** @var array<int, string> */
|
||||
$modulesDir = scandir(modules_path());
|
||||
|
||||
$migrationDirectories = [];
|
||||
foreach ($modulesDir as $module) {
|
||||
if (is_dir(modules_path($module.'/Database/Migrations'))) {
|
||||
$migrationDirectories[] = modules_path($module.'/Database/Migrations');
|
||||
}
|
||||
}
|
||||
|
||||
return $migrationDirectories;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,17 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the application's Nova resources.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function resources(): void
|
||||
{
|
||||
Nova::resourcesIn(app_path('Nova'));
|
||||
Nova::resourcesIn(app_path('Modules'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tools that should be listed in the Nova sidebar.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user