mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-06-15 13:32:43 +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\Session\Middleware\StartSession;
|
||||||
use Illuminate\Support\Facades\App;
|
use Illuminate\Support\Facades\App;
|
||||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||||
|
use Nwidart\Modules\Facades\Module;
|
||||||
use pxlrbt\FilamentEnvironmentIndicator\EnvironmentIndicatorPlugin;
|
use pxlrbt\FilamentEnvironmentIndicator\EnvironmentIndicatorPlugin;
|
||||||
|
|
||||||
class AdminPanelProvider extends PanelProvider
|
class AdminPanelProvider extends PanelProvider
|
||||||
{
|
{
|
||||||
public function panel(Panel $panel): Panel
|
public function panel(Panel $panel): Panel
|
||||||
{
|
{
|
||||||
return $panel
|
$panel->default()
|
||||||
->default()
|
|
||||||
->id('admin')
|
->id('admin')
|
||||||
->path('admin')
|
->path('admin')
|
||||||
->colors([
|
->colors([
|
||||||
@@ -72,5 +72,26 @@ class AdminPanelProvider extends PanelProvider
|
|||||||
->authMiddleware([
|
->authMiddleware([
|
||||||
Authenticate::class,
|
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();
|
$this->hideSensitiveRequestDetails();
|
||||||
|
|
||||||
Telescope::filter(function (IncomingEntry $entry) {
|
Telescope::filter(function (IncomingEntry $entry): bool {
|
||||||
if ($this->app->environment('local')) {
|
if ($this->app->environment('local')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,6 +67,11 @@ return [
|
|||||||
'replace_placeholders' => true,
|
'replace_placeholders' => true,
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'stack_production' => [
|
||||||
|
'driver' => 'stack',
|
||||||
|
'channels' => ['single', 'sentry'],
|
||||||
|
],
|
||||||
|
|
||||||
'daily' => [
|
'daily' => [
|
||||||
'driver' => 'daily',
|
'driver' => 'daily',
|
||||||
'path' => storage_path('logs/laravel.log'),
|
'path' => storage_path('logs/laravel.log'),
|
||||||
@@ -84,6 +89,12 @@ return [
|
|||||||
'replace_placeholders' => true,
|
'replace_placeholders' => true,
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'sentry' => [
|
||||||
|
'driver' => 'sentry',
|
||||||
|
'level' => env('LOG_LEVEL', 'error'),
|
||||||
|
'bubble' => true,
|
||||||
|
],
|
||||||
|
|
||||||
'papertrail' => [
|
'papertrail' => [
|
||||||
'driver' => 'monolog',
|
'driver' => 'monolog',
|
||||||
'level' => env('LOG_LEVEL', 'debug'),
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
|||||||
Reference in New Issue
Block a user