mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-06-15 05:22:44 +01:00
Added filament lookup for extensions
This commit is contained in:
committed by
Constantin Graf
parent
5e979db912
commit
bd6263708d
@@ -21,14 +21,14 @@ use Illuminate\Session\Middleware\AuthenticateSession;
|
||||
use Illuminate\Session\Middleware\StartSession;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||
use Nwidart\Modules\Facades\Module;
|
||||
use pxlrbt\FilamentEnvironmentIndicator\EnvironmentIndicatorPlugin;
|
||||
|
||||
class AdminPanelProvider extends PanelProvider
|
||||
{
|
||||
public function panel(Panel $panel): Panel
|
||||
{
|
||||
return $panel
|
||||
->default()
|
||||
$panel->default()
|
||||
->id('admin')
|
||||
->path('admin')
|
||||
->colors([
|
||||
@@ -72,5 +72,26 @@ class AdminPanelProvider extends PanelProvider
|
||||
->authMiddleware([
|
||||
Authenticate::class,
|
||||
]);
|
||||
|
||||
$modules = Module::allEnabled();
|
||||
|
||||
foreach ($modules as $module) {
|
||||
$panel->discoverResources(
|
||||
in: module_path($module->getName(), 'app/Filament/Resources'),
|
||||
for: 'Extensions\\'.$module->getName().'\\App\\Filament\\Resources'
|
||||
);
|
||||
|
||||
$panel->discoverPages(
|
||||
in: module_path($module->getName(), 'app/Filament/Pages'),
|
||||
for: 'Extensions\\'.$module->getName().'\\App\\Filament\\Pages'
|
||||
);
|
||||
|
||||
$panel->discoverWidgets(
|
||||
in: module_path($module->getName(), 'app/Filament/Widgets'),
|
||||
for: 'Extensions\\'.$module->getName().'\\App\\Filament\\Widgets'
|
||||
);
|
||||
}
|
||||
|
||||
return $panel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
|
||||
|
||||
$this->hideSensitiveRequestDetails();
|
||||
|
||||
Telescope::filter(function (IncomingEntry $entry) {
|
||||
Telescope::filter(function (IncomingEntry $entry): bool {
|
||||
if ($this->app->environment('local')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -67,6 +67,11 @@ return [
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'stack_production' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single', 'sentry'],
|
||||
],
|
||||
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
@@ -84,6 +89,12 @@ return [
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'sentry' => [
|
||||
'driver' => 'sentry',
|
||||
'level' => env('LOG_LEVEL', 'error'),
|
||||
'bubble' => true,
|
||||
],
|
||||
|
||||
'papertrail' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
|
||||
Reference in New Issue
Block a user