From 6821284ed01a619c712513830aaa6cc77adc190e Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Sun, 1 Sep 2024 20:33:21 +0300 Subject: [PATCH] feat: custom user model --- composer.lock | 325 +++++++++--------- config/zeus-bolt.php | 1 + docs/getting-started/configuration.md | 16 + src/Configuration.php | 4 +- src/Filament/Exports/ResponseExporter.php | 5 +- .../FormResource/Pages/ManageResponses.php | 4 +- src/Models/Collection.php | 2 +- src/Models/Form.php | 2 +- src/Models/Response.php | 2 +- 9 files changed, 194 insertions(+), 167 deletions(-) diff --git a/composer.lock b/composer.lock index cc7fcfeb..a8e47c90 100644 --- a/composer.lock +++ b/composer.lock @@ -1428,16 +1428,16 @@ }, { "name": "filament/actions", - "version": "v3.2.107", + "version": "v3.2.110", "source": { "type": "git", "url": "https://github.com/filamentphp/actions.git", - "reference": "de5ce76f20ee21af92b951dec2a5c533ecacbc79" + "reference": "5d6e4fe444f1ef04d373518248a445bbcc3ca272" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/actions/zipball/de5ce76f20ee21af92b951dec2a5c533ecacbc79", - "reference": "de5ce76f20ee21af92b951dec2a5c533ecacbc79", + "url": "https://api.github.com/repos/filamentphp/actions/zipball/5d6e4fe444f1ef04d373518248a445bbcc3ca272", + "reference": "5d6e4fe444f1ef04d373518248a445bbcc3ca272", "shasum": "" }, "require": { @@ -1477,20 +1477,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-08-22T12:07:53+00:00" + "time": "2024-08-26T07:22:35+00:00" }, { "name": "filament/filament", - "version": "v3.2.107", + "version": "v3.2.110", "source": { "type": "git", "url": "https://github.com/filamentphp/panels.git", - "reference": "2675472f2bdd4e765a1f3e533231bda7750a2881" + "reference": "130636e90e821154e0ce60dcbc7b358d2a1a716f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/panels/zipball/2675472f2bdd4e765a1f3e533231bda7750a2881", - "reference": "2675472f2bdd4e765a1f3e533231bda7750a2881", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/130636e90e821154e0ce60dcbc7b358d2a1a716f", + "reference": "130636e90e821154e0ce60dcbc7b358d2a1a716f", "shasum": "" }, "require": { @@ -1542,20 +1542,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-08-20T08:32:50+00:00" + "time": "2024-08-30T01:52:09+00:00" }, { "name": "filament/forms", - "version": "v3.2.107", + "version": "v3.2.110", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "0f80913deb90bfe9e1850ab35e80a34194cfb652" + "reference": "02fe2e211993f6291b719a093ed6f63e17125e9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/0f80913deb90bfe9e1850ab35e80a34194cfb652", - "reference": "0f80913deb90bfe9e1850ab35e80a34194cfb652", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/02fe2e211993f6291b719a093ed6f63e17125e9a", + "reference": "02fe2e211993f6291b719a093ed6f63e17125e9a", "shasum": "" }, "require": { @@ -1598,11 +1598,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-08-22T12:07:43+00:00" + "time": "2024-08-30T18:04:06+00:00" }, { "name": "filament/infolists", - "version": "v3.2.107", + "version": "v3.2.110", "source": { "type": "git", "url": "https://github.com/filamentphp/infolists.git", @@ -1653,7 +1653,7 @@ }, { "name": "filament/notifications", - "version": "v3.2.107", + "version": "v3.2.110", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", @@ -1705,7 +1705,7 @@ }, { "name": "filament/spatie-laravel-translatable-plugin", - "version": "v3.2.107", + "version": "v3.2.110", "source": { "type": "git", "url": "https://github.com/filamentphp/spatie-laravel-translatable-plugin.git", @@ -1750,16 +1750,16 @@ }, { "name": "filament/support", - "version": "v3.2.107", + "version": "v3.2.110", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", - "reference": "f00b84d43d157c85837108a7eeaceabbaf6044ab" + "reference": "78e25428c754fcbb30c321d5dda439c760de9837" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/support/zipball/f00b84d43d157c85837108a7eeaceabbaf6044ab", - "reference": "f00b84d43d157c85837108a7eeaceabbaf6044ab", + "url": "https://api.github.com/repos/filamentphp/support/zipball/78e25428c754fcbb30c321d5dda439c760de9837", + "reference": "78e25428c754fcbb30c321d5dda439c760de9837", "shasum": "" }, "require": { @@ -1805,20 +1805,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-08-22T12:08:05+00:00" + "time": "2024-08-26T07:22:57+00:00" }, { "name": "filament/tables", - "version": "v3.2.107", + "version": "v3.2.110", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "5de49ef865e8788bb29d58723b88977b593a7b02" + "reference": "129943d1b4e6c1edeef53e804eb56ef78a932a6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/5de49ef865e8788bb29d58723b88977b593a7b02", - "reference": "5de49ef865e8788bb29d58723b88977b593a7b02", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/129943d1b4e6c1edeef53e804eb56ef78a932a6c", + "reference": "129943d1b4e6c1edeef53e804eb56ef78a932a6c", "shasum": "" }, "require": { @@ -1857,11 +1857,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-08-22T12:08:13+00:00" + "time": "2024-08-30T01:52:14+00:00" }, { "name": "filament/widgets", - "version": "v3.2.107", + "version": "v3.2.110", "source": { "type": "git", "url": "https://github.com/filamentphp/widgets.git", @@ -5141,16 +5141,16 @@ }, { "name": "spatie/laravel-package-tools", - "version": "1.16.4", + "version": "1.16.5", "source": { "type": "git", "url": "https://github.com/spatie/laravel-package-tools.git", - "reference": "ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53" + "reference": "c7413972cf22ffdff97b68499c22baa04eddb6a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53", - "reference": "ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/c7413972cf22ffdff97b68499c22baa04eddb6a2", + "reference": "c7413972cf22ffdff97b68499c22baa04eddb6a2", "shasum": "" }, "require": { @@ -5189,7 +5189,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-package-tools/issues", - "source": "https://github.com/spatie/laravel-package-tools/tree/1.16.4" + "source": "https://github.com/spatie/laravel-package-tools/tree/1.16.5" }, "funding": [ { @@ -5197,7 +5197,7 @@ "type": "github" } ], - "time": "2024-03-20T07:29:11+00:00" + "time": "2024-08-27T18:56:10+00:00" }, { "name": "spatie/laravel-translatable", @@ -5283,16 +5283,16 @@ }, { "name": "symfony/console", - "version": "v6.4.10", + "version": "v6.4.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "504974cbe43d05f83b201d6498c206f16fc0cdbc" + "reference": "42686880adaacdad1835ee8fc2a9ec5b7bd63998" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/504974cbe43d05f83b201d6498c206f16fc0cdbc", - "reference": "504974cbe43d05f83b201d6498c206f16fc0cdbc", + "url": "https://api.github.com/repos/symfony/console/zipball/42686880adaacdad1835ee8fc2a9ec5b7bd63998", + "reference": "42686880adaacdad1835ee8fc2a9ec5b7bd63998", "shasum": "" }, "require": { @@ -5357,7 +5357,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.10" + "source": "https://github.com/symfony/console/tree/v6.4.11" }, "funding": [ { @@ -5373,7 +5373,7 @@ "type": "tidelift" } ], - "time": "2024-07-26T12:30:32+00:00" + "time": "2024-08-15T22:48:29+00:00" }, { "name": "symfony/css-selector", @@ -5740,16 +5740,16 @@ }, { "name": "symfony/finder", - "version": "v6.4.10", + "version": "v6.4.11", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "af29198d87112bebdd397bd7735fbd115997824c" + "reference": "d7eb6daf8cd7e9ac4976e9576b32042ef7253453" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/af29198d87112bebdd397bd7735fbd115997824c", - "reference": "af29198d87112bebdd397bd7735fbd115997824c", + "url": "https://api.github.com/repos/symfony/finder/zipball/d7eb6daf8cd7e9ac4976e9576b32042ef7253453", + "reference": "d7eb6daf8cd7e9ac4976e9576b32042ef7253453", "shasum": "" }, "require": { @@ -5784,7 +5784,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.10" + "source": "https://github.com/symfony/finder/tree/v6.4.11" }, "funding": [ { @@ -5800,7 +5800,7 @@ "type": "tidelift" } ], - "time": "2024-07-24T07:06:38+00:00" + "time": "2024-08-13T14:27:37+00:00" }, { "name": "symfony/html-sanitizer", @@ -5950,16 +5950,16 @@ }, { "name": "symfony/http-kernel", - "version": "v6.4.10", + "version": "v6.4.11", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "147e0daf618d7575b5007055340d09aece5cf068" + "reference": "1ba6b89d781cb47448155cc70dd2e0f1b0584c79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/147e0daf618d7575b5007055340d09aece5cf068", - "reference": "147e0daf618d7575b5007055340d09aece5cf068", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1ba6b89d781cb47448155cc70dd2e0f1b0584c79", + "reference": "1ba6b89d781cb47448155cc70dd2e0f1b0584c79", "shasum": "" }, "require": { @@ -6044,7 +6044,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.4.10" + "source": "https://github.com/symfony/http-kernel/tree/v6.4.11" }, "funding": [ { @@ -6060,7 +6060,7 @@ "type": "tidelift" } ], - "time": "2024-07-26T14:52:04+00:00" + "time": "2024-08-30T16:57:20+00:00" }, { "name": "symfony/mailer", @@ -6144,16 +6144,16 @@ }, { "name": "symfony/mime", - "version": "v6.4.9", + "version": "v6.4.11", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "7d048964877324debdcb4e0549becfa064a20d43" + "reference": "dba5d5f6073baf7a3576b580cc4a208b4ca00553" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/7d048964877324debdcb4e0549becfa064a20d43", - "reference": "7d048964877324debdcb4e0549becfa064a20d43", + "url": "https://api.github.com/repos/symfony/mime/zipball/dba5d5f6073baf7a3576b580cc4a208b4ca00553", + "reference": "dba5d5f6073baf7a3576b580cc4a208b4ca00553", "shasum": "" }, "require": { @@ -6209,7 +6209,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.4.9" + "source": "https://github.com/symfony/mime/tree/v6.4.11" }, "funding": [ { @@ -6225,7 +6225,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T09:49:33+00:00" + "time": "2024-08-13T12:15:02+00:00" }, { "name": "symfony/polyfill-ctype", @@ -7000,16 +7000,16 @@ }, { "name": "symfony/routing", - "version": "v6.4.10", + "version": "v6.4.11", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "aad19fe10753ba842f0d653a8db819c4b3affa87" + "reference": "8ee0c24c1bf61c263a26f1b9b6d19e83b1121f2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/aad19fe10753ba842f0d653a8db819c4b3affa87", - "reference": "aad19fe10753ba842f0d653a8db819c4b3affa87", + "url": "https://api.github.com/repos/symfony/routing/zipball/8ee0c24c1bf61c263a26f1b9b6d19e83b1121f2a", + "reference": "8ee0c24c1bf61c263a26f1b9b6d19e83b1121f2a", "shasum": "" }, "require": { @@ -7063,7 +7063,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.10" + "source": "https://github.com/symfony/routing/tree/v6.4.11" }, "funding": [ { @@ -7079,7 +7079,7 @@ "type": "tidelift" } ], - "time": "2024-07-15T09:26:24+00:00" + "time": "2024-08-29T08:15:38+00:00" }, { "name": "symfony/service-contracts", @@ -7166,16 +7166,16 @@ }, { "name": "symfony/string", - "version": "v7.1.3", + "version": "v7.1.4", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ea272a882be7f20cad58d5d78c215001617b7f07" + "reference": "6cd670a6d968eaeb1c77c2e76091c45c56bc367b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ea272a882be7f20cad58d5d78c215001617b7f07", - "reference": "ea272a882be7f20cad58d5d78c215001617b7f07", + "url": "https://api.github.com/repos/symfony/string/zipball/6cd670a6d968eaeb1c77c2e76091c45c56bc367b", + "reference": "6cd670a6d968eaeb1c77c2e76091c45c56bc367b", "shasum": "" }, "require": { @@ -7233,7 +7233,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.3" + "source": "https://github.com/symfony/string/tree/v7.1.4" }, "funding": [ { @@ -7249,7 +7249,7 @@ "type": "tidelift" } ], - "time": "2024-07-22T10:25:37+00:00" + "time": "2024-08-12T09:59:40+00:00" }, { "name": "symfony/translation", @@ -7426,16 +7426,16 @@ }, { "name": "symfony/uid", - "version": "v6.4.8", + "version": "v6.4.11", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "35904eca37a84bb764c560cbfcac9f0ac2bcdbdf" + "reference": "6a0394ad707de386547223948fac1e0f2805bc0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/35904eca37a84bb764c560cbfcac9f0ac2bcdbdf", - "reference": "35904eca37a84bb764c560cbfcac9f0ac2bcdbdf", + "url": "https://api.github.com/repos/symfony/uid/zipball/6a0394ad707de386547223948fac1e0f2805bc0b", + "reference": "6a0394ad707de386547223948fac1e0f2805bc0b", "shasum": "" }, "require": { @@ -7480,7 +7480,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v6.4.8" + "source": "https://github.com/symfony/uid/tree/v6.4.11" }, "funding": [ { @@ -7496,20 +7496,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-08-12T09:55:28+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.4.10", + "version": "v6.4.11", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "a71cc3374f5fb9759da1961d28c452373b343dd4" + "reference": "ee14c8254a480913268b1e3b1cba8045ed122694" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/a71cc3374f5fb9759da1961d28c452373b343dd4", - "reference": "a71cc3374f5fb9759da1961d28c452373b343dd4", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ee14c8254a480913268b1e3b1cba8045ed122694", + "reference": "ee14c8254a480913268b1e3b1cba8045ed122694", "shasum": "" }, "require": { @@ -7565,7 +7565,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.10" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.11" }, "funding": [ { @@ -7581,7 +7581,7 @@ "type": "tidelift" } ], - "time": "2024-07-26T12:30:32+00:00" + "time": "2024-08-30T16:03:21+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -8079,16 +8079,16 @@ }, { "name": "composer/pcre", - "version": "3.3.0", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "1637e067347a0c40bbb1e3cd786b20dcab556a81" + "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/1637e067347a0c40bbb1e3cd786b20dcab556a81", - "reference": "1637e067347a0c40bbb1e3cd786b20dcab556a81", + "url": "https://api.github.com/repos/composer/pcre/zipball/63aaeac21d7e775ff9bc9d45021e1745c97521c4", + "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4", "shasum": "" }, "require": { @@ -8138,7 +8138,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.3.0" + "source": "https://github.com/composer/pcre/tree/3.3.1" }, "funding": [ { @@ -8154,7 +8154,7 @@ "type": "tidelift" } ], - "time": "2024-08-19T19:43:53+00:00" + "time": "2024-08-27T18:44:43+00:00" }, { "name": "composer/semver", @@ -8493,16 +8493,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42" + "reference": "8520451a140d3f46ac33042715115e290cf5785f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42", - "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/8520451a140d3f46ac33042715115e290cf5785f", + "reference": "8520451a140d3f46ac33042715115e290cf5785f", "shasum": "" }, "require": { @@ -8542,7 +8542,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.2.0" }, "funding": [ { @@ -8550,7 +8550,7 @@ "type": "github" } ], - "time": "2024-02-07T09:43:46+00:00" + "time": "2024-08-06T10:04:20+00:00" }, { "name": "filp/whoops", @@ -8625,16 +8625,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.62.0", + "version": "v3.64.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "627692f794d35c43483f34b01d94740df2a73507" + "reference": "58dd9c931c785a79739310aef5178928305ffa67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/627692f794d35c43483f34b01d94740df2a73507", - "reference": "627692f794d35c43483f34b01d94740df2a73507", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/58dd9c931c785a79739310aef5178928305ffa67", + "reference": "58dd9c931c785a79739310aef5178928305ffa67", "shasum": "" }, "require": { @@ -8716,7 +8716,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.62.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.64.0" }, "funding": [ { @@ -8724,7 +8724,7 @@ "type": "github" } ], - "time": "2024-08-07T17:03:09+00:00" + "time": "2024-08-30T23:09:38+00:00" }, { "name": "guzzlehttp/psr7", @@ -9886,16 +9886,16 @@ }, { "name": "orchestra/testbench", - "version": "v8.25.0", + "version": "v8.26.0", "source": { "type": "git", "url": "https://github.com/orchestral/testbench.git", - "reference": "892f2d15a783c9403a043b1a39a3b4b8732b9fe2" + "reference": "9ee9037ca2ca6bf68776fbc5992eee4fc5070424" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/892f2d15a783c9403a043b1a39a3b4b8732b9fe2", - "reference": "892f2d15a783c9403a043b1a39a3b4b8732b9fe2", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/9ee9037ca2ca6bf68776fbc5992eee4fc5070424", + "reference": "9ee9037ca2ca6bf68776fbc5992eee4fc5070424", "shasum": "" }, "require": { @@ -9903,7 +9903,7 @@ "fakerphp/faker": "^1.21", "laravel/framework": "^10.48.20", "mockery/mockery": "^1.5.1", - "orchestra/testbench-core": "^8.26", + "orchestra/testbench-core": "^8.27", "orchestra/workbench": "^8.9", "php": "^8.1", "phpunit/phpunit": "^9.6 || ^10.1", @@ -9935,22 +9935,22 @@ ], "support": { "issues": "https://github.com/orchestral/testbench/issues", - "source": "https://github.com/orchestral/testbench/tree/v8.25.0" + "source": "https://github.com/orchestral/testbench/tree/v8.26.0" }, - "time": "2024-08-14T06:19:27+00:00" + "time": "2024-08-26T04:52:44+00:00" }, { "name": "orchestra/testbench-core", - "version": "v8.26.0", + "version": "v8.27.0", "source": { "type": "git", "url": "https://github.com/orchestral/testbench-core.git", - "reference": "c3bc4a4440b312035da6659b87973a4cda584476" + "reference": "95185200e654c75e4d5d6626f6ec139c5a4699ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/c3bc4a4440b312035da6659b87973a4cda584476", - "reference": "c3bc4a4440b312035da6659b87973a4cda584476", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/95185200e654c75e4d5d6626f6ec139c5a4699ca", + "reference": "95185200e654c75e4d5d6626f6ec139c5a4699ca", "shasum": "" }, "require": { @@ -9961,6 +9961,7 @@ "conflict": { "brianium/paratest": "<6.4.0 || >=7.0.0 <7.1.4 || >=8.0.0", "laravel/framework": "<10.48.20 || >=11.0.0", + "laravel/serializable-closure": "<1.3.0 || >=2.0.0", "nunomaduro/collision": "<6.4.0 || >=7.0.0 <7.4.0 || >=8.0.0", "orchestra/testbench-dusk": "<8.21.0 || >=9.0.0", "orchestra/workbench": "<1.0.0", @@ -10029,20 +10030,20 @@ "issues": "https://github.com/orchestral/testbench/issues", "source": "https://github.com/orchestral/testbench-core" }, - "time": "2024-08-14T05:31:02+00:00" + "time": "2024-08-26T04:43:39+00:00" }, { "name": "orchestra/workbench", - "version": "v8.9.0", + "version": "v8.10.0", "source": { "type": "git", "url": "https://github.com/orchestral/workbench.git", - "reference": "4fffe3d448d8aec28223262e60c29b3ab5d83e3d" + "reference": "17329eae5f82c9fe6daa7e468956b618ca44cc42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/workbench/zipball/4fffe3d448d8aec28223262e60c29b3ab5d83e3d", - "reference": "4fffe3d448d8aec28223262e60c29b3ab5d83e3d", + "url": "https://api.github.com/repos/orchestral/workbench/zipball/17329eae5f82c9fe6daa7e468956b618ca44cc42", + "reference": "17329eae5f82c9fe6daa7e468956b618ca44cc42", "shasum": "" }, "require": { @@ -10052,7 +10053,7 @@ "laravel/tinker": "^2.8.2", "nunomaduro/collision": "^6.4 || ^7.10", "orchestra/canvas": "^8.11.9", - "orchestra/testbench-core": "^8.25", + "orchestra/testbench-core": "^8.27", "php": "^8.1", "spatie/laravel-ray": "^1.32.4", "symfony/polyfill-php83": "^1.28", @@ -10098,9 +10099,9 @@ ], "support": { "issues": "https://github.com/orchestral/workbench/issues", - "source": "https://github.com/orchestral/workbench/tree/v8.9.0" + "source": "https://github.com/orchestral/workbench/tree/v8.10.0" }, - "time": "2024-08-14T00:14:55+00:00" + "time": "2024-08-26T05:33:39+00:00" }, { "name": "pestphp/pest", @@ -10975,16 +10976,16 @@ }, { "name": "phpmyadmin/sql-parser", - "version": "5.9.1", + "version": "5.10.0", "source": { "type": "git", "url": "https://github.com/phpmyadmin/sql-parser.git", - "reference": "169a9f11f1957ea36607c9b29eac1b48679f1ecc" + "reference": "91d980ab76c3f152481e367f62b921adc38af451" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/169a9f11f1957ea36607c9b29eac1b48679f1ecc", - "reference": "169a9f11f1957ea36607c9b29eac1b48679f1ecc", + "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/91d980ab76c3f152481e367f62b921adc38af451", + "reference": "91d980ab76c3f152481e367f62b921adc38af451", "shasum": "" }, "require": { @@ -11058,20 +11059,20 @@ "type": "other" } ], - "time": "2024-08-13T19:01:01+00:00" + "time": "2024-08-29T20:56:34+00:00" }, { "name": "phpstan/extension-installer", - "version": "1.4.1", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/phpstan/extension-installer.git", - "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203" + "reference": "46c8219b3fb0deb3fc08301e8f0797d321d17dcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f6b87faf9fc7978eab2f7919a8760bc9f58f9203", - "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/46c8219b3fb0deb3fc08301e8f0797d321d17dcd", + "reference": "46c8219b3fb0deb3fc08301e8f0797d321d17dcd", "shasum": "" }, "require": { @@ -11098,24 +11099,28 @@ "MIT" ], "description": "Composer plugin for automatic installation of PHPStan extensions", + "keywords": [ + "dev", + "static analysis" + ], "support": { "issues": "https://github.com/phpstan/extension-installer/issues", - "source": "https://github.com/phpstan/extension-installer/tree/1.4.1" + "source": "https://github.com/phpstan/extension-installer/tree/1.4.2" }, - "time": "2024-06-10T08:20:49+00:00" + "time": "2024-08-26T07:38:00+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.29.1", + "version": "1.30.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4" + "reference": "5ceb0e384997db59f38774bf79c2a6134252c08f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4", - "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/5ceb0e384997db59f38774bf79c2a6134252c08f", + "reference": "5ceb0e384997db59f38774bf79c2a6134252c08f", "shasum": "" }, "require": { @@ -11147,22 +11152,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.30.0" }, - "time": "2024-05-31T08:52:43+00:00" + "time": "2024-08-29T09:54:52+00:00" }, { "name": "phpstan/phpstan", - "version": "1.11.11", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "707c2aed5d8d0075666e673a5e71440c1d01a5a3" + "reference": "384af967d35b2162f69526c7276acadce534d0e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/707c2aed5d8d0075666e673a5e71440c1d01a5a3", - "reference": "707c2aed5d8d0075666e673a5e71440c1d01a5a3", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/384af967d35b2162f69526c7276acadce534d0e1", + "reference": "384af967d35b2162f69526c7276acadce534d0e1", "shasum": "" }, "require": { @@ -11207,7 +11212,7 @@ "type": "github" } ], - "time": "2024-08-19T14:37:29+00:00" + "time": "2024-08-27T09:18:05+00:00" }, { "name": "phpunit/php-code-coverage", @@ -13691,16 +13696,16 @@ }, { "name": "symfony/cache", - "version": "v7.1.3", + "version": "v7.1.4", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "8ac37acee794372f9732fe8a61a8221f6762148e" + "reference": "b61e464d7687bb7e8f677d5031c632bf3820df18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/8ac37acee794372f9732fe8a61a8221f6762148e", - "reference": "8ac37acee794372f9732fe8a61a8221f6762148e", + "url": "https://api.github.com/repos/symfony/cache/zipball/b61e464d7687bb7e8f677d5031c632bf3820df18", + "reference": "b61e464d7687bb7e8f677d5031c632bf3820df18", "shasum": "" }, "require": { @@ -13768,7 +13773,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v7.1.3" + "source": "https://github.com/symfony/cache/tree/v7.1.4" }, "funding": [ { @@ -13784,7 +13789,7 @@ "type": "tidelift" } ], - "time": "2024-07-17T06:10:24+00:00" + "time": "2024-08-12T09:59:40+00:00" }, { "name": "symfony/cache-contracts", @@ -13930,16 +13935,16 @@ }, { "name": "symfony/http-client", - "version": "v7.1.3", + "version": "v7.1.4", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "b79858aa7a051ea791b0d50269a234a0b50cb231" + "reference": "a8f8d60b30b331cf4b743b3632e5acdba3f8285c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/b79858aa7a051ea791b0d50269a234a0b50cb231", - "reference": "b79858aa7a051ea791b0d50269a234a0b50cb231", + "url": "https://api.github.com/repos/symfony/http-client/zipball/a8f8d60b30b331cf4b743b3632e5acdba3f8285c", + "reference": "a8f8d60b30b331cf4b743b3632e5acdba3f8285c", "shasum": "" }, "require": { @@ -14004,7 +14009,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.1.3" + "source": "https://github.com/symfony/http-client/tree/v7.1.4" }, "funding": [ { @@ -14020,7 +14025,7 @@ "type": "tidelift" } ], - "time": "2024-07-17T06:10:24+00:00" + "time": "2024-08-26T06:32:37+00:00" }, { "name": "symfony/http-client-contracts", @@ -14463,16 +14468,16 @@ }, { "name": "symfony/yaml", - "version": "v6.4.8", + "version": "v6.4.11", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "52903de178d542850f6f341ba92995d3d63e60c9" + "reference": "be37e7f13195e05ab84ca5269365591edd240335" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/52903de178d542850f6f341ba92995d3d63e60c9", - "reference": "52903de178d542850f6f341ba92995d3d63e60c9", + "url": "https://api.github.com/repos/symfony/yaml/zipball/be37e7f13195e05ab84ca5269365591edd240335", + "reference": "be37e7f13195e05ab84ca5269365591edd240335", "shasum": "" }, "require": { @@ -14515,7 +14520,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.4.8" + "source": "https://github.com/symfony/yaml/tree/v6.4.11" }, "funding": [ { @@ -14531,7 +14536,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-08-12T09:55:28+00:00" }, { "name": "ta-tikoma/phpunit-architecture-test", diff --git a/config/zeus-bolt.php b/config/zeus-bolt.php index a0d3309c..cb5713e6 100644 --- a/config/zeus-bolt.php +++ b/config/zeus-bolt.php @@ -36,6 +36,7 @@ 'FormsStatus' => \LaraZeus\Bolt\Models\FormsStatus::class, 'Response' => \LaraZeus\Bolt\Models\Response::class, 'Section' => \LaraZeus\Bolt\Models\Section::class, + 'User' => config('auth.providers.users.model'), ], 'collectors' => [ diff --git a/docs/getting-started/configuration.md b/docs/getting-started/configuration.md index 2788fed7..06de71d0 100644 --- a/docs/getting-started/configuration.md +++ b/docs/getting-started/configuration.md @@ -30,6 +30,7 @@ BoltPlugin::make() 'FormsStatus' => \App\Models\Bolt\FormsStatus::class, 'Response' => \App\Models\Bolt\Response::class, 'Section' => \App\Models\Bolt\Section::class, + 'User' => \App\Models\Staff::class, ]) // make the actions floating in create and edit forms @@ -104,3 +105,18 @@ to publish the configuration: ```bash php artisan vendor:publish --tag=zeus-bolt-config ``` + +### Custom User Model: + +By default Bolt will user this model to get the user info: + +`config('auth.providers.users.model')` + +if you need to change this to use another model, add the following in your config file: `zeus-bolt.php`: + +```php +'models' => [ + //... + 'User' => AnotherUserModel::class, +], +``` \ No newline at end of file diff --git a/src/Configuration.php b/src/Configuration.php index f4a0abcf..9bd2cceb 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -65,12 +65,12 @@ public function getBoltModels(): array return $this->boltModels; } - public static function getModel(string $model): string + public static function getModel(string $model): ?string { return array_merge( config('zeus-bolt.models'), (new static)::get()->getBoltModels() - )[$model]; + )[$model] ?? null; } public function navigationGroupLabel(Closure | string $label): static diff --git a/src/Filament/Exports/ResponseExporter.php b/src/Filament/Exports/ResponseExporter.php index 9f86c681..433a624a 100644 --- a/src/Filament/Exports/ResponseExporter.php +++ b/src/Filament/Exports/ResponseExporter.php @@ -6,6 +6,7 @@ use Filament\Actions\Exports\Exporter; use Filament\Actions\Exports\Models\Export; use Illuminate\Database\Eloquent\Model; +use LaraZeus\Bolt\BoltPlugin; use LaraZeus\Bolt\Models\Field; use LaraZeus\Bolt\Models\Response; @@ -18,7 +19,9 @@ class ResponseExporter extends Exporter public static function getColumns(): array { $record = \Livewire\Livewire::current()->getRecord(); - $getUserModel = config('auth.providers.users.model')::getBoltUserFullNameAttribute(); + //todo refactor with v4 + $userModel = BoltPlugin::getModel('User') ?? config('auth.providers.users.model'); + $getUserModel = $userModel::getBoltUserFullNameAttribute(); $mainColumns = [ ExportColumn::make('user.' . $getUserModel) ->label(__('Name')) diff --git a/src/Filament/Resources/FormResource/Pages/ManageResponses.php b/src/Filament/Resources/FormResource/Pages/ManageResponses.php index c96c895d..da76c58c 100644 --- a/src/Filament/Resources/FormResource/Pages/ManageResponses.php +++ b/src/Filament/Resources/FormResource/Pages/ManageResponses.php @@ -32,7 +32,9 @@ class ManageResponses extends ManageRelatedRecords public function table(Table $table): Table { - $getUserModel = config('auth.providers.users.model')::getBoltUserFullNameAttribute(); + //todo refactor with v4 + $userModel = BoltPlugin::getModel('User') ?? config('auth.providers.users.model'); + $getUserModel = $userModel::getBoltUserFullNameAttribute(); $mainColumns = [ ImageColumn::make('user.avatar') diff --git a/src/Models/Collection.php b/src/Models/Collection.php index df48a86b..7559f470 100644 --- a/src/Models/Collection.php +++ b/src/Models/Collection.php @@ -54,6 +54,6 @@ protected static function newFactory(): Factory public function user(): BelongsTo { - return $this->belongsTo(config('auth.providers.users.model')); + return $this->belongsTo(config('zeus-bolt.models.User') ?? config('auth.providers.users.model')); } } diff --git a/src/Models/Form.php b/src/Models/Form.php index 0cec8329..8b12e83e 100644 --- a/src/Models/Form.php +++ b/src/Models/Form.php @@ -114,7 +114,7 @@ protected static function newFactory(): Factory public function user(): BelongsTo { - return $this->belongsTo(config('auth.providers.users.model')); + return $this->belongsTo(config('zeus-bolt.models.User') ?? config('auth.providers.users.model')); } /** @phpstan-return BelongsTo */ diff --git a/src/Models/Response.php b/src/Models/Response.php index 7c6e1e0f..30056748 100644 --- a/src/Models/Response.php +++ b/src/Models/Response.php @@ -79,7 +79,7 @@ public function fieldsResponses(): HasMany public function user(): BelongsTo { - return $this->belongsTo(config('auth.providers.users.model')); + return $this->belongsTo(config('zeus-bolt.models.User') ?? config('auth.providers.users.model')); } /** @return BelongsTo */