diff --git a/composer.json b/composer.json index d64e6fa..c010d9e 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,7 @@ ], "require": { "php": "^8.1", + "spatie/laravel-package-tools": "^1.16", "calebporzio/sushi": "^2.4", "filament/filament": "^3.2", "ryangjchandler/blade-tabler-icons": "^2.3", diff --git a/composer.lock b/composer.lock index 1cdf9ca..781f2e6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "30f8800bfa580b51cc61d69b9d8a95b6", + "content-hash": "39b8017c80f0c32123ef3b46a00243fa", "packages": [ { "name": "anourvalar/eloquent-serialize", - "version": "1.2.21", + "version": "1.2.22", "source": { "type": "git", "url": "https://github.com/AnourValar/eloquent-serialize.git", - "reference": "39766b21c8de0dbbff8a9368c2579502fd1d248e" + "reference": "6e91093c10940859c4b0549b6a90f18d8db45998" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/AnourValar/eloquent-serialize/zipball/39766b21c8de0dbbff8a9368c2579502fd1d248e", - "reference": "39766b21c8de0dbbff8a9368c2579502fd1d248e", + "url": "https://api.github.com/repos/AnourValar/eloquent-serialize/zipball/6e91093c10940859c4b0549b6a90f18d8db45998", + "reference": "6e91093c10940859c4b0549b6a90f18d8db45998", "shasum": "" }, "require": { @@ -68,9 +68,9 @@ ], "support": { "issues": "https://github.com/AnourValar/eloquent-serialize/issues", - "source": "https://github.com/AnourValar/eloquent-serialize/tree/1.2.21" + "source": "https://github.com/AnourValar/eloquent-serialize/tree/1.2.22" }, - "time": "2024-03-15T14:33:22+00:00" + "time": "2024-03-22T12:56:46+00:00" }, { "name": "bacon/bacon-qr-code", @@ -1325,16 +1325,16 @@ }, { "name": "filament/actions", - "version": "v3.2.57", + "version": "v3.2.58", "source": { "type": "git", "url": "https://github.com/filamentphp/actions.git", - "reference": "5c5fbb3366f320457545ff84a0e0308009e579c2" + "reference": "8523fabf8d48301d80023d3955bc2d21e52b1e2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/actions/zipball/5c5fbb3366f320457545ff84a0e0308009e579c2", - "reference": "5c5fbb3366f320457545ff84a0e0308009e579c2", + "url": "https://api.github.com/repos/filamentphp/actions/zipball/8523fabf8d48301d80023d3955bc2d21e52b1e2f", + "reference": "8523fabf8d48301d80023d3955bc2d21e52b1e2f", "shasum": "" }, "require": { @@ -1374,20 +1374,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-19T00:27:45+00:00" + "time": "2024-03-21T22:43:16+00:00" }, { "name": "filament/filament", - "version": "v3.2.57", + "version": "v3.2.58", "source": { "type": "git", "url": "https://github.com/filamentphp/panels.git", - "reference": "ea6d13fe154cece0a74a4d898d07e40bf72aad3c" + "reference": "88d5003772a91b0da0decb330524cb3e3ca04f2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/panels/zipball/ea6d13fe154cece0a74a4d898d07e40bf72aad3c", - "reference": "ea6d13fe154cece0a74a4d898d07e40bf72aad3c", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/88d5003772a91b0da0decb330524cb3e3ca04f2f", + "reference": "88d5003772a91b0da0decb330524cb3e3ca04f2f", "shasum": "" }, "require": { @@ -1439,20 +1439,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-20T10:06:43+00:00" + "time": "2024-03-21T22:43:18+00:00" }, { "name": "filament/forms", - "version": "v3.2.57", + "version": "v3.2.58", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "4f65d7a75809501a58b3d05028ddcbb46f06eb1a" + "reference": "9b69ecfa3294a46908fb0428144254d9f6aefd1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/4f65d7a75809501a58b3d05028ddcbb46f06eb1a", - "reference": "4f65d7a75809501a58b3d05028ddcbb46f06eb1a", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/9b69ecfa3294a46908fb0428144254d9f6aefd1d", + "reference": "9b69ecfa3294a46908fb0428144254d9f6aefd1d", "shasum": "" }, "require": { @@ -1495,20 +1495,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-20T10:06:36+00:00" + "time": "2024-03-21T22:43:17+00:00" }, { "name": "filament/infolists", - "version": "v3.2.57", + "version": "v3.2.58", "source": { "type": "git", "url": "https://github.com/filamentphp/infolists.git", - "reference": "72217e2ae055bfea51feb3351e00f269b188796d" + "reference": "63e91468157ce0734a09b1db0affad579262bdfe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/infolists/zipball/72217e2ae055bfea51feb3351e00f269b188796d", - "reference": "72217e2ae055bfea51feb3351e00f269b188796d", + "url": "https://api.github.com/repos/filamentphp/infolists/zipball/63e91468157ce0734a09b1db0affad579262bdfe", + "reference": "63e91468157ce0734a09b1db0affad579262bdfe", "shasum": "" }, "require": { @@ -1546,11 +1546,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-14T10:54:02+00:00" + "time": "2024-03-21T22:43:11+00:00" }, { "name": "filament/notifications", - "version": "v3.2.57", + "version": "v3.2.58", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", @@ -1602,7 +1602,7 @@ }, { "name": "filament/spatie-laravel-translatable-plugin", - "version": "v3.2.57", + "version": "v3.2.58", "source": { "type": "git", "url": "https://github.com/filamentphp/spatie-laravel-translatable-plugin.git", @@ -1647,16 +1647,16 @@ }, { "name": "filament/support", - "version": "v3.2.57", + "version": "v3.2.58", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", - "reference": "f10144d4758d7873ee8d471530a4455a1105ca53" + "reference": "1bb8f468624b0b06f20bc5da858cdb5b6a97d53f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/support/zipball/f10144d4758d7873ee8d471530a4455a1105ca53", - "reference": "f10144d4758d7873ee8d471530a4455a1105ca53", + "url": "https://api.github.com/repos/filamentphp/support/zipball/1bb8f468624b0b06f20bc5da858cdb5b6a97d53f", + "reference": "1bb8f468624b0b06f20bc5da858cdb5b6a97d53f", "shasum": "" }, "require": { @@ -1672,7 +1672,7 @@ "spatie/color": "^1.5", "spatie/invade": "^1.0|^2.0", "spatie/laravel-package-tools": "^1.9", - "symfony/html-sanitizer": "^6.1" + "symfony/html-sanitizer": "^6.1|^7.0" }, "type": "library", "extra": { @@ -1700,20 +1700,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-14T14:14:06+00:00" + "time": "2024-03-21T22:43:36+00:00" }, { "name": "filament/tables", - "version": "v3.2.57", + "version": "v3.2.58", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "0b57a67224d06a6e6c83b131fad68a5c71bf03a2" + "reference": "ffbb066f0f123b24512e104e97f37acb817909f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/0b57a67224d06a6e6c83b131fad68a5c71bf03a2", - "reference": "0b57a67224d06a6e6c83b131fad68a5c71bf03a2", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/ffbb066f0f123b24512e104e97f37acb817909f7", + "reference": "ffbb066f0f123b24512e104e97f37acb817909f7", "shasum": "" }, "require": { @@ -1753,11 +1753,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-20T10:07:09+00:00" + "time": "2024-03-21T22:43:39+00:00" }, { "name": "filament/widgets", - "version": "v3.2.57", + "version": "v3.2.58", "source": { "type": "git", "url": "https://github.com/filamentphp/widgets.git", @@ -2293,16 +2293,16 @@ }, { "name": "lara-zeus/erebus", - "version": "v1.0.3", + "version": "v1.0.4", "source": { "type": "git", "url": "https://github.com/lara-zeus/erebus.git", - "reference": "535e71b9fc42c3d7c2ce31e707cda79170060c8f" + "reference": "46eefd8883735fa29e6c076b4f67afaa314b18de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lara-zeus/erebus/zipball/535e71b9fc42c3d7c2ce31e707cda79170060c8f", - "reference": "535e71b9fc42c3d7c2ce31e707cda79170060c8f", + "url": "https://api.github.com/repos/lara-zeus/erebus/zipball/46eefd8883735fa29e6c076b4f67afaa314b18de", + "reference": "46eefd8883735fa29e6c076b4f67afaa314b18de", "shasum": "" }, "require": { @@ -2378,7 +2378,7 @@ "type": "github" } ], - "time": "2024-03-20T20:37:03+00:00" + "time": "2024-03-20T23:40:25+00:00" }, { "name": "lara-zeus/popover", @@ -2466,16 +2466,16 @@ }, { "name": "laravel/framework", - "version": "v10.48.3", + "version": "v10.48.4", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "5791c052b41c6b593556adc687076bfbdd13c501" + "reference": "7e0701bf59cb76a51f7c1f7bea51c0c0c29c0b72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/5791c052b41c6b593556adc687076bfbdd13c501", - "reference": "5791c052b41c6b593556adc687076bfbdd13c501", + "url": "https://api.github.com/repos/laravel/framework/zipball/7e0701bf59cb76a51f7c1f7bea51c0c0c29c0b72", + "reference": "7e0701bf59cb76a51f7c1f7bea51c0c0c29c0b72", "shasum": "" }, "require": { @@ -2580,7 +2580,7 @@ "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.5.1", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^8.18", + "orchestra/testbench-core": "^8.23.4", "pda/pheanstalk": "^4.0", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.0.7", @@ -2669,7 +2669,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-03-15T10:17:07+00:00" + "time": "2024-03-21T13:36:36+00:00" }, { "name": "laravel/prompts", @@ -3272,16 +3272,16 @@ }, { "name": "league/uri", - "version": "7.4.0", + "version": "7.4.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "bf414ba956d902f5d98bf9385fcf63954f09dce5" + "reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/bf414ba956d902f5d98bf9385fcf63954f09dce5", - "reference": "bf414ba956d902f5d98bf9385fcf63954f09dce5", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/bedb6e55eff0c933668addaa7efa1e1f2c417cc4", + "reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4", "shasum": "" }, "require": { @@ -3350,7 +3350,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri/tree/7.4.0" + "source": "https://github.com/thephpleague/uri/tree/7.4.1" }, "funding": [ { @@ -3358,20 +3358,20 @@ "type": "github" } ], - "time": "2023-12-01T06:24:25+00:00" + "time": "2024-03-23T07:42:40+00:00" }, { "name": "league/uri-interfaces", - "version": "7.4.0", + "version": "7.4.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "bd8c487ec236930f7bbc42b8d374fa882fbba0f3" + "reference": "8d43ef5c841032c87e2de015972c06f3865ef718" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/bd8c487ec236930f7bbc42b8d374fa882fbba0f3", - "reference": "bd8c487ec236930f7bbc42b8d374fa882fbba0f3", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/8d43ef5c841032c87e2de015972c06f3865ef718", + "reference": "8d43ef5c841032c87e2de015972c06f3865ef718", "shasum": "" }, "require": { @@ -3434,7 +3434,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/7.4.0" + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.4.1" }, "funding": [ { @@ -3442,7 +3442,7 @@ "type": "github" } ], - "time": "2023-11-24T15:40:42+00:00" + "time": "2024-03-23T07:42:40+00:00" }, { "name": "livewire/livewire", @@ -6258,23 +6258,23 @@ }, { "name": "symfony/html-sanitizer", - "version": "v6.4.4", + "version": "v7.0.4", "source": { "type": "git", "url": "https://github.com/symfony/html-sanitizer.git", - "reference": "83e1dc8b49345e078cfa21bd4c563dfa99c5ed63" + "reference": "a8543ad56bc5250378ca44bb3988516fcb073c5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/html-sanitizer/zipball/83e1dc8b49345e078cfa21bd4c563dfa99c5ed63", - "reference": "83e1dc8b49345e078cfa21bd4c563dfa99c5ed63", + "url": "https://api.github.com/repos/symfony/html-sanitizer/zipball/a8543ad56bc5250378ca44bb3988516fcb073c5d", + "reference": "a8543ad56bc5250378ca44bb3988516fcb073c5d", "shasum": "" }, "require": { "ext-dom": "*", "league/uri": "^6.5|^7.0", "masterminds/html5": "^2.7.2", - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -6307,7 +6307,7 @@ "sanitizer" ], "support": { - "source": "https://github.com/symfony/html-sanitizer/tree/v6.4.4" + "source": "https://github.com/symfony/html-sanitizer/tree/v7.0.4" }, "funding": [ { @@ -6323,7 +6323,7 @@ "type": "tidelift" } ], - "time": "2024-02-13T16:25:19+00:00" + "time": "2024-02-15T11:33:06+00:00" }, { "name": "symfony/http-foundation", @@ -8923,16 +8923,16 @@ }, { "name": "mockery/mockery", - "version": "1.6.10", + "version": "1.6.11", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "47065d1be1fa05def58dc14c03cf831d3884ef0b" + "reference": "81a161d0b135df89951abd52296adf97deb0723d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/47065d1be1fa05def58dc14c03cf831d3884ef0b", - "reference": "47065d1be1fa05def58dc14c03cf831d3884ef0b", + "url": "https://api.github.com/repos/mockery/mockery/zipball/81a161d0b135df89951abd52296adf97deb0723d", + "reference": "81a161d0b135df89951abd52296adf97deb0723d", "shasum": "" }, "require": { @@ -9002,7 +9002,7 @@ "security": "https://github.com/mockery/mockery/security/advisories", "source": "https://github.com/mockery/mockery" }, - "time": "2024-03-19T16:15:45+00:00" + "time": "2024-03-21T18:34:15+00:00" }, { "name": "myclabs/deep-copy", @@ -9219,25 +9219,25 @@ }, { "name": "orchestra/canvas", - "version": "v8.11.7", + "version": "v8.11.8", "source": { "type": "git", "url": "https://github.com/orchestral/canvas.git", - "reference": "e4a0157f522222725f1559bde0da1091a91542fb" + "reference": "31b1f338fb9d2f3c97ccbc62b27d3e5bf86a02e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/canvas/zipball/e4a0157f522222725f1559bde0da1091a91542fb", - "reference": "e4a0157f522222725f1559bde0da1091a91542fb", + "url": "https://api.github.com/repos/orchestral/canvas/zipball/31b1f338fb9d2f3c97ccbc62b27d3e5bf86a02e5", + "reference": "31b1f338fb9d2f3c97ccbc62b27d3e5bf86a02e5", "shasum": "" }, "require": { "composer-runtime-api": "^2.2", "composer/semver": "^3.0", - "illuminate/console": "^10.39", - "illuminate/database": "^10.39", - "illuminate/filesystem": "^10.39", - "illuminate/support": "^10.39", + "illuminate/console": "^10.48.4", + "illuminate/database": "^10.48.4", + "illuminate/filesystem": "^10.48.4", + "illuminate/support": "^10.48.4", "orchestra/canvas-core": "^8.10.2", "orchestra/testbench-core": "^8.19", "php": "^8.1", @@ -9245,12 +9245,12 @@ "symfony/yaml": "^6.2" }, "require-dev": { - "laravel/framework": "^10.39", + "laravel/framework": "^10.48.4", "laravel/pint": "^1.6", "mockery/mockery": "^1.5.1", - "phpstan/phpstan": "^1.10.5", - "phpunit/phpunit": "^10.1", - "spatie/laravel-ray": "^1.32.4" + "phpstan/phpstan": "^1.10.56", + "phpunit/phpunit": "^10.5", + "spatie/laravel-ray": "^1.33" }, "bin": [ "canvas" @@ -9288,9 +9288,9 @@ "description": "Code Generators for Laravel Applications and Packages", "support": { "issues": "https://github.com/orchestral/canvas/issues", - "source": "https://github.com/orchestral/canvas/tree/v8.11.7" + "source": "https://github.com/orchestral/canvas/tree/v8.11.8" }, - "time": "2024-02-07T10:29:23+00:00" + "time": "2024-03-21T14:41:18+00:00" }, { "name": "orchestra/canvas-core", @@ -9833,16 +9833,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.63", + "version": "1.10.65", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "ad12836d9ca227301f5fb9960979574ed8628339" + "reference": "3c657d057a0b7ecae19cb12db446bbc99d8839c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ad12836d9ca227301f5fb9960979574ed8628339", - "reference": "ad12836d9ca227301f5fb9960979574ed8628339", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/3c657d057a0b7ecae19cb12db446bbc99d8839c6", + "reference": "3c657d057a0b7ecae19cb12db446bbc99d8839c6", "shasum": "" }, "require": { @@ -9891,7 +9891,7 @@ "type": "tidelift" } ], - "time": "2024-03-18T16:53:53+00:00" + "time": "2024-03-23T10:30:26+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -10316,16 +10316,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.13", + "version": "10.5.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "20a63fc1c6db29b15da3bd02d4b6cf59900088a7" + "reference": "86376e05e8745ed81d88232ff92fee868247b07b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/20a63fc1c6db29b15da3bd02d4b6cf59900088a7", - "reference": "20a63fc1c6db29b15da3bd02d4b6cf59900088a7", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/86376e05e8745ed81d88232ff92fee868247b07b", + "reference": "86376e05e8745ed81d88232ff92fee868247b07b", "shasum": "" }, "require": { @@ -10397,7 +10397,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.13" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.15" }, "funding": [ { @@ -10413,7 +10413,7 @@ "type": "tidelift" } ], - "time": "2024-03-12T15:37:41+00:00" + "time": "2024-03-22T04:17:47+00:00" }, { "name": "pimple/pimple", @@ -11019,16 +11019,16 @@ }, { "name": "sebastian/environment", - "version": "6.0.1", + "version": "6.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", - "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", "shasum": "" }, "require": { @@ -11043,7 +11043,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -11071,7 +11071,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" }, "funding": [ { @@ -11079,7 +11079,7 @@ "type": "github" } ], - "time": "2023-04-11T05:39:26+00:00" + "time": "2024-03-23T08:47:14+00:00" }, { "name": "sebastian/exporter", diff --git a/src/Configuration.php b/src/Configuration.php index e27d110..a532728 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -12,7 +12,7 @@ trait Configuration protected Closure | string $navigationGroupLabel = 'Tartarus'; protected array $tartarusModels = [ - //'Notification' => \LaraZeus\Tartarus\Models\Notification::class, + 'Company' => \LaraZeus\Tartarus\Models\Company::class, ]; public function navigationGroupLabel(Closure | string $label): static diff --git a/src/Middleware/SetTenant.php b/src/Middleware/SetTenant.php index e7f0cf1..2951e8c 100644 --- a/src/Middleware/SetTenant.php +++ b/src/Middleware/SetTenant.php @@ -5,8 +5,8 @@ use Closure; use Filament\Support\Colors\Color; use Filament\Support\Facades\FilamentColor; -use Illuminate\Database\Eloquent\Model; use Illuminate\Http\Request; +use LaraZeus\Tartarus\Models\Company; use Symfony\Component\HttpFoundation\Response; class SetTenant @@ -32,17 +32,19 @@ public function handle(Request $request, Closure $next): Response return $next($request); } - private function setPanelConfiguration(Model $tenant): void + private function setPanelConfiguration(Company $tenant): void { - $colorName = str($tenant->primary_color ?? 'Blue')->title(); - $color = constant("Filament\Support\Colors\Color::$colorName"); - FilamentColor::register([ - 'primary' => $color, - 'secondary' => Color::Amber, - 'danger' => Color::Red, - 'info' => Color::Blue, - 'success' => Color::Green, - 'warning' => Color::Yellow, - ]); + if ($tenant->primary_color !== null) { + $colorName = str($tenant->primary_color)->title(); + $color = constant("Filament\Support\Colors\Color::$colorName"); + FilamentColor::register([ + 'primary' => $color, + 'secondary' => Color::Amber, + 'danger' => Color::Red, + 'info' => Color::Blue, + 'success' => Color::Green, + 'warning' => Color::Yellow, + ]); + } } } diff --git a/src/Models/Company.php b/src/Models/Company.php index 77e40a3..db22412 100644 --- a/src/Models/Company.php +++ b/src/Models/Company.php @@ -32,6 +32,7 @@ class Company extends Model implements HasAvatar, HasCurrentTenantLabel, HasName public function getTenantId(): ?string { + // @phpstan-ignore-next-line return auth()->user()?->company_id; } @@ -133,9 +134,12 @@ protected function defaultProfilePhotoUrl(): string return mb_substr($segment, 0, 1); })->join(' ')); - $colorName = str(tenant()->primary_color ?? 'Blue')->title(); - $color = constant("Filament\Support\Colors\Color::$colorName"); - $bgColor = str(Rgb::fromString('rgb(' . $color[500] . ')')->toHex())->replace('#', ''); + $bgColor = 'BFA577'; + if (tenant()->primary_color !== null) { + $colorName = str(tenant()->primary_color)->title(); + $color = constant("Filament\Support\Colors\Color::$colorName"); + $bgColor = str(Rgb::fromString('rgb(' . $color[500] . ')')->toHex())->replace('#', ''); + } return sprintf('https://ui-avatars.com/api/?name=%s&color=FFFFFF&background=' . $bgColor, urlencode($name)); }