diff --git a/app/Http/Middleware/SetThemeMiddleware.php b/app/Http/Middleware/SetThemeMiddleware.php index 359369f..aae6859 100755 --- a/app/Http/Middleware/SetThemeMiddleware.php +++ b/app/Http/Middleware/SetThemeMiddleware.php @@ -2,21 +2,25 @@ namespace App\Http\Middleware; +use App\Services\ThemeService; use Closure; use Illuminate\Http\Request; -use Qirolab\Theme\Theme; use Symfony\Component\HttpFoundation\Response; class SetThemeMiddleware { + public function __construct( + private readonly ThemeService $themeService, + ) {} + public function handle(Request $request, Closure $next): Response { $theme = setting('theme'); if (empty($theme) || $theme === '1') { - Theme::set('atom'); + $this->themeService->set('atom'); } else { - Theme::set($theme); + $this->themeService->set($theme); } return $next($request); diff --git a/app/Providers/ThemeServiceProvider.php b/app/Providers/ThemeServiceProvider.php new file mode 100644 index 0000000..7949acf --- /dev/null +++ b/app/Providers/ThemeServiceProvider.php @@ -0,0 +1,24 @@ +app->singleton(ThemeService::class, fn () => new ThemeService); + } + + public function boot(): void + { + if (config('theme.active')) { + app(ThemeService::class)->set( + config('theme.active'), + config('theme.parent'), + ); + } + } +} diff --git a/app/Services/ThemeService.php b/app/Services/ThemeService.php new file mode 100644 index 0000000..313ba9b --- /dev/null +++ b/app/Services/ThemeService.php @@ -0,0 +1,69 @@ +clear(); + + $basePath = config('theme.base_path', base_path('resources/themes')); + + if ($parentTheme) { + View::addLocation("{$basePath}/{$parentTheme}/views"); + $this->parentTheme = $parentTheme; + } + + View::addLocation("{$basePath}/{$theme}/views"); + $this->activeTheme = $theme; + + $this->registerVendorNamespaces($theme, $basePath); + } + + public function active(): ?string + { + return $this->activeTheme; + } + + public function parent(): ?string + { + return $this->parentTheme; + } + + public function resolve(?string $theme = null): string + { + return $theme ?? $this->activeTheme ?? self::DEFAULT_THEME; + } + + public function clear(): void + { + $this->activeTheme = null; + $this->parentTheme = null; + } + + private function registerVendorNamespaces(string $theme, string $basePath): void + { + $vendorPath = "{$basePath}/{$theme}/views/vendor"; + + if (! is_dir($vendorPath)) { + return; + } + + $directories = scandir($vendorPath); + + foreach ($directories as $namespace) { + if ($namespace !== '.' && $namespace !== '..') { + View::prependNamespace($namespace, "{$vendorPath}/{$namespace}"); + } + } + } +} diff --git a/composer.json b/composer.json index f25c7d8..c7494ca 100755 --- a/composer.json +++ b/composer.json @@ -12,7 +12,6 @@ "require": { "php": "^8.1|^8.2|^8.3|^8.4|^8.5", "ext-sockets": "*", - "doctrine/dbal": "^4.4", "filament/filament": "^5.6", "guzzlehttp/guzzle": "^7.10", "inertiajs/inertia-laravel": "^3.1", @@ -24,7 +23,6 @@ "laravel/tinker": "^3.0", "livewire/livewire": "^4.3", "opcodesio/log-viewer": "^3.24", - "qirolab/laravel-themer": "dev-master", "ryangjchandler/laravel-cloudflare-turnstile": "^3.0", "spatie/laravel-activitylog": "^5.0", "spatie/laravel-sluggable": "^4.0", @@ -35,19 +33,15 @@ "require-dev": { "fakerphp/faker": "^1.24", "filament/upgrade": "^5.6", - "fruitcake/laravel-debugbar": "^4.2", - "itsgoingd/clockwork": "^5.3", "laravel/boost": "^2.4", "laravel/pint": "^v1.29", "laravel/sail": "^1.60", - "mockery/mockery": "^1.6", "nunomaduro/collision": "^8.9", "pestphp/pest": "^4.7", "phpstan/phpstan": "^2.1", "phpunit/phpunit": "^12.5", "rector/rector": "^2.4", - "spatie/laravel-ignition": "^2.12", - "whichbrowser/parser": "^2.1" + "spatie/laravel-ignition": "^2.12" }, "autoload": { "psr-4": { @@ -99,7 +93,6 @@ "pestphp/pest-plugin": true } }, - "repositories": [], "minimum-stability": "stable", "prefer-stable": true } diff --git a/composer.lock b/composer.lock index a509a1a..c73d877 100755 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b124d8a22803da548bb33931f590e3bf", + "content-hash": "04a61e4ada2a72cd206a818020eca28b", "packages": [ { "name": "bacon/bacon-qr-code", @@ -808,112 +808,6 @@ }, "time": "2024-07-08T12:26:09+00:00" }, - { - "name": "doctrine/dbal", - "version": "4.4.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/dbal.git", - "reference": "61e730f1658814821a85f2402c945f3883407dec" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/61e730f1658814821a85f2402c945f3883407dec", - "reference": "61e730f1658814821a85f2402c945f3883407dec", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.1.5", - "php": "^8.2", - "psr/cache": "^1|^2|^3", - "psr/log": "^1|^2|^3" - }, - "require-dev": { - "doctrine/coding-standard": "14.0.0", - "fig/log-test": "^1", - "jetbrains/phpstorm-stubs": "2023.2", - "phpstan/phpstan": "2.1.30", - "phpstan/phpstan-phpunit": "2.0.7", - "phpstan/phpstan-strict-rules": "^2", - "phpunit/phpunit": "11.5.50", - "slevomat/coding-standard": "8.27.1", - "squizlabs/php_codesniffer": "4.0.1", - "symfony/cache": "^6.3.8|^7.0|^8.0", - "symfony/console": "^5.4|^6.3|^7.0|^8.0" - }, - "suggest": { - "symfony/console": "For helpful console commands such as SQL execution and import of files." - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\DBAL\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - } - ], - "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", - "homepage": "https://www.doctrine-project.org/projects/dbal.html", - "keywords": [ - "abstraction", - "database", - "db2", - "dbal", - "mariadb", - "mssql", - "mysql", - "oci8", - "oracle", - "pdo", - "pgsql", - "postgresql", - "queryobject", - "sasql", - "sql", - "sqlite", - "sqlserver", - "sqlsrv" - ], - "support": { - "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/4.4.3" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", - "type": "tidelift" - } - ], - "time": "2026-03-20T08:52:12+00:00" - }, { "name": "doctrine/deprecations", "version": "1.1.6", @@ -1321,59 +1215,6 @@ }, "time": "2025-10-17T16:34:55+00:00" }, - { - "name": "facade/ignition-contracts", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/facade/ignition-contracts.git", - "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", - "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", - "shasum": "" - }, - "require": { - "php": "^7.3|^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^v2.15.8", - "phpunit/phpunit": "^9.3.11", - "vimeo/psalm": "^3.17.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Facade\\IgnitionContracts\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://flareapp.io", - "role": "Developer" - } - ], - "description": "Solution contracts for Ignition", - "homepage": "https://github.com/facade/ignition-contracts", - "keywords": [ - "contracts", - "flare", - "ignition" - ], - "support": { - "issues": "https://github.com/facade/ignition-contracts/issues", - "source": "https://github.com/facade/ignition-contracts/tree/1.0.2" - }, - "time": "2020-10-16T08:27:54+00:00" - }, { "name": "filament/actions", "version": "v5.6.7", @@ -5865,55 +5706,6 @@ }, "time": "2026-05-08T19:24:44+00:00" }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "time": "2021-02-03T23:26:27+00:00" - }, { "name": "psr/clock", "version": "1.0.0", @@ -6405,77 +6197,6 @@ }, "time": "2026-05-23T13:41:31+00:00" }, - { - "name": "qirolab/laravel-themer", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/qirolab/laravel-themer.git", - "reference": "d6bb07f3d7cd80760e1b9ac95ba02be5ed69c97c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/qirolab/laravel-themer/zipball/d6bb07f3d7cd80760e1b9ac95ba02be5ed69c97c", - "reference": "d6bb07f3d7cd80760e1b9ac95ba02be5ed69c97c", - "shasum": "" - }, - "require": { - "facade/ignition-contracts": "^1.0", - "illuminate/support": "^9.19|^10.0|^11.0|^12.0|^13.0", - "php": ">=7.1.0" - }, - "require-dev": { - "orchestra/testbench": "^7.0|^8.0|^9.0|^10.0|^11.0", - "phpunit/phpunit": "^8.3|^9.0|^10.5|^11.5.3|^12.5.12", - "vimeo/psalm": "^4.0|^5.22|^6.7" - }, - "default-branch": true, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Qirolab\\Theme\\ThemeServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Qirolab\\Theme\\": "src", - "Qirolab\\Theme\\Database\\Factories\\": "database/factories" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Harish Kumar", - "email": "harish@qirolab.com", - "homepage": "https://qirolab.com", - "role": "Developer" - } - ], - "description": "A Laravel theme manager, that will help you organize and maintain your themes inside Laravel projects.", - "homepage": "https://qirolab.com", - "keywords": [ - "laravel", - "laravel-theme", - "qirolab", - "theme" - ], - "support": { - "issues": "https://github.com/qirolab/laravel-themer/issues", - "source": "https://github.com/qirolab/laravel-themer/tree/master" - }, - "funding": [ - { - "url": "https://www.buymeacoffee.com/qirolab", - "type": "other" - } - ], - "time": "2026-03-06T16:47:56+00:00" - }, { "name": "ralouphie/getallheaders", "version": "3.0.3", @@ -12697,235 +12418,6 @@ ], "time": "2025-08-08T12:00:00+00:00" }, - { - "name": "fruitcake/laravel-debugbar", - "version": "v4.3.0", - "source": { - "type": "git", - "url": "https://github.com/fruitcake/laravel-debugbar.git", - "reference": "3d76ea8d78b82225b92789de65fc630c1cd8e80c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fruitcake/laravel-debugbar/zipball/3d76ea8d78b82225b92789de65fc630c1cd8e80c", - "reference": "3d76ea8d78b82225b92789de65fc630c1cd8e80c", - "shasum": "" - }, - "require": { - "illuminate/routing": "^11|^12|^13.0", - "illuminate/session": "^11|^12|^13.0", - "illuminate/support": "^11|^12|^13.0", - "php": "^8.2", - "php-debugbar/php-debugbar": "^3.7.2", - "php-debugbar/symfony-bridge": "^1.1" - }, - "replace": { - "barryvdh/laravel-debugbar": "self.version" - }, - "require-dev": { - "larastan/larastan": "^3", - "laravel/octane": "^2", - "laravel/pennant": "^1", - "laravel/pint": "^1", - "laravel/telescope": "^5.16", - "livewire/livewire": "^3.7|^4", - "mockery/mockery": "^1.3.3", - "orchestra/testbench-dusk": "^9|^10|^11", - "php-debugbar/twig-bridge": "^2.0", - "phpstan/phpstan-phpunit": "^2", - "phpstan/phpstan-strict-rules": "^2.0", - "phpunit/phpunit": "^11", - "shipmonk/phpstan-rules": "^4.3" - }, - "type": "library", - "extra": { - "laravel": { - "aliases": { - "Debugbar": "Fruitcake\\LaravelDebugbar\\Facades\\Debugbar" - }, - "providers": [ - "Fruitcake\\LaravelDebugbar\\ServiceProvider" - ] - }, - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Fruitcake\\LaravelDebugbar\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fruitcake", - "homepage": "https://fruitcake.nl" - }, - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "PHP Debugbar integration for Laravel", - "keywords": [ - "barryvdh", - "debug", - "debugbar", - "dev", - "laravel", - "profiler", - "webprofiler" - ], - "support": { - "issues": "https://github.com/fruitcake/laravel-debugbar/issues", - "source": "https://github.com/fruitcake/laravel-debugbar/tree/v4.3.0" - }, - "funding": [ - { - "url": "https://fruitcake.nl", - "type": "custom" - }, - { - "url": "https://github.com/barryvdh", - "type": "github" - } - ], - "time": "2026-06-04T07:54:01+00:00" - }, - { - "name": "hamcrest/hamcrest-php", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", - "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", - "shasum": "" - }, - "require": { - "php": "^7.4|^8.0" - }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" - }, - "require-dev": { - "phpunit/php-file-iterator": "^1.4 || ^2.0 || ^3.0", - "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "classmap": [ - "hamcrest" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" - ], - "support": { - "issues": "https://github.com/hamcrest/hamcrest-php/issues", - "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.1.1" - }, - "time": "2025-04-30T06:54:44+00:00" - }, - { - "name": "itsgoingd/clockwork", - "version": "v5.3.5", - "source": { - "type": "git", - "url": "https://github.com/itsgoingd/clockwork.git", - "reference": "d928483e231f042dbff9258795cb17aadaebc7d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/itsgoingd/clockwork/zipball/d928483e231f042dbff9258795cb17aadaebc7d0", - "reference": "d928483e231f042dbff9258795cb17aadaebc7d0", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": ">=7.1" - }, - "suggest": { - "ext-pdo": "Needed in order to use a SQL database for metadata storage", - "ext-pdo_mysql": "Needed in order to use MySQL for metadata storage", - "ext-pdo_postgres": "Needed in order to use Postgres for metadata storage", - "ext-pdo_sqlite": "Needed in order to use a SQLite for metadata storage", - "ext-redis": "Needed in order to use Redis for metadata storage", - "php-http/discovery": "Vanilla integration - required for the middleware zero-configuration setup" - }, - "type": "library", - "extra": { - "laravel": { - "aliases": { - "Clockwork": "Clockwork\\Support\\Laravel\\Facade" - }, - "providers": [ - "Clockwork\\Support\\Laravel\\ClockworkServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Clockwork\\": "Clockwork/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "itsgoingd", - "email": "itsgoingd@luzer.sk", - "homepage": "https://twitter.com/itsgoingd" - } - ], - "description": "php dev tools in your browser", - "homepage": "https://underground.works/clockwork", - "keywords": [ - "Devtools", - "debugging", - "laravel", - "logging", - "lumen", - "profiling", - "slim" - ], - "support": { - "issues": "https://github.com/itsgoingd/clockwork/issues", - "source": "https://github.com/itsgoingd/clockwork/tree/v5.3.5" - }, - "funding": [ - { - "url": "https://github.com/itsgoingd", - "type": "github" - } - ], - "time": "2025-09-14T15:34:49+00:00" - }, { "name": "jean85/pretty-package-versions", "version": "2.1.1", @@ -13318,89 +12810,6 @@ }, "time": "2026-05-27T04:02:01+00:00" }, - { - "name": "mockery/mockery", - "version": "1.6.12", - "source": { - "type": "git", - "url": "https://github.com/mockery/mockery.git", - "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", - "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", - "shasum": "" - }, - "require": { - "hamcrest/hamcrest-php": "^2.0.1", - "lib-pcre": ">=7.0", - "php": ">=7.3" - }, - "conflict": { - "phpunit/phpunit": "<8.0" - }, - "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.6.17", - "symplify/easy-coding-standard": "^12.1.14" - }, - "type": "library", - "autoload": { - "files": [ - "library/helpers.php", - "library/Mockery.php" - ], - "psr-4": { - "Mockery\\": "library/Mockery" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "https://github.com/padraic", - "role": "Author" - }, - { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "https://davedevelopment.co.uk", - "role": "Developer" - }, - { - "name": "Nathanael Esayeas", - "email": "nathanael.esayeas@protonmail.com", - "homepage": "https://github.com/ghostwriter", - "role": "Lead Developer" - } - ], - "description": "Mockery is a simple yet flexible PHP mock object framework", - "homepage": "https://github.com/mockery/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ], - "support": { - "docs": "https://docs.mockery.io/", - "issues": "https://github.com/mockery/mockery/issues", - "rss": "https://github.com/mockery/mockery/releases.atom", - "security": "https://github.com/mockery/mockery/security/advisories", - "source": "https://github.com/mockery/mockery" - }, - "time": "2024-05-16T03:13:13+00:00" - }, { "name": "myclabs/deep-copy", "version": "1.13.4", @@ -14066,174 +13475,6 @@ }, "time": "2022-02-21T01:04:05+00:00" }, - { - "name": "php-debugbar/php-debugbar", - "version": "v3.7.6", - "source": { - "type": "git", - "url": "https://github.com/php-debugbar/php-debugbar.git", - "reference": "1690ee1728827f9deb4b60457fa387cf44672c56" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-debugbar/php-debugbar/zipball/1690ee1728827f9deb4b60457fa387cf44672c56", - "reference": "1690ee1728827f9deb4b60457fa387cf44672c56", - "shasum": "" - }, - "require": { - "php": "^8.2", - "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^5.4|^6|^7|^8" - }, - "replace": { - "maximebf/debugbar": "self.version" - }, - "require-dev": { - "dbrekelmans/bdi": "^1.4", - "friendsofphp/php-cs-fixer": "^3.92", - "monolog/monolog": "^3.9", - "php-debugbar/doctrine-bridge": "^3@dev", - "php-debugbar/monolog-bridge": "^1@dev", - "php-debugbar/symfony-bridge": "^1@dev", - "php-debugbar/twig-bridge": "^2@dev", - "phpstan/phpstan": "^2.1", - "phpstan/phpstan-phpunit": "^2.0", - "phpstan/phpstan-strict-rules": "^2.0", - "phpunit/phpunit": "^10", - "predis/predis": "^3.3", - "shipmonk/phpstan-rules": "^4.3", - "symfony/browser-kit": "^6.4|7.0", - "symfony/dom-crawler": "^6.4|^7", - "symfony/event-dispatcher": "^5.4|^6.4|^7.3|^8.0", - "symfony/http-foundation": "^5.4|^6.4|^7.3|^8.0", - "symfony/mailer": "^5.4|^6.4|^7.3|^8.0", - "symfony/panther": "^1|^2.1", - "twig/twig": "^3.11.2" - }, - "suggest": { - "php-debugbar/doctrine-bridge": "To integrate Doctrine with php-debugbar.", - "php-debugbar/monolog-bridge": "To integrate Monolog with php-debugbar.", - "php-debugbar/symfony-bridge": "To integrate Symfony with php-debugbar.", - "php-debugbar/twig-bridge": "To integrate Twig with php-debugbar." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "DebugBar\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maxime Bouroumeau-Fuseau", - "email": "maxime.bouroumeau@gmail.com", - "homepage": "http://maximebf.com" - }, - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "Debug bar in the browser for php application", - "homepage": "https://github.com/php-debugbar/php-debugbar", - "keywords": [ - "debug", - "debug bar", - "debugbar", - "dev", - "profiler", - "toolbar" - ], - "support": { - "issues": "https://github.com/php-debugbar/php-debugbar/issues", - "source": "https://github.com/php-debugbar/php-debugbar/tree/v3.7.6" - }, - "funding": [ - { - "url": "https://fruitcake.nl", - "type": "custom" - }, - { - "url": "https://github.com/barryvdh", - "type": "github" - } - ], - "time": "2026-04-30T07:31:44+00:00" - }, - { - "name": "php-debugbar/symfony-bridge", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-debugbar/symfony-bridge.git", - "reference": "e37d2debe5d316408b00d0ab2688d9c2cf59b5ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-debugbar/symfony-bridge/zipball/e37d2debe5d316408b00d0ab2688d9c2cf59b5ad", - "reference": "e37d2debe5d316408b00d0ab2688d9c2cf59b5ad", - "shasum": "" - }, - "require": { - "php": "^8.2", - "php-debugbar/php-debugbar": "^3.1", - "symfony/http-foundation": "^5.4|^6.4|^7.3|^8.0" - }, - "require-dev": { - "dbrekelmans/bdi": "^1.4", - "phpunit/phpunit": "^10", - "symfony/browser-kit": "^6|^7", - "symfony/dom-crawler": "^6|^7", - "symfony/mailer": "^5.4|^6.4|^7.3|^8.0", - "symfony/panther": "^1|^2.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "DebugBar\\Bridge\\Symfony\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maxime Bouroumeau-Fuseau", - "email": "maxime.bouroumeau@gmail.com", - "homepage": "http://maximebf.com" - }, - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "Symfony bridge for PHP Debugbar", - "homepage": "https://github.com/php-debugbar/php-debugbar", - "keywords": [ - "debugbar", - "dev", - "symfony" - ], - "support": { - "issues": "https://github.com/php-debugbar/symfony-bridge/issues", - "source": "https://github.com/php-debugbar/symfony-bridge/tree/v1.1.0" - }, - "time": "2026-01-15T14:47:34+00:00" - }, { "name": "phpstan/phpstan", "version": "2.2.2", @@ -16247,76 +15488,11 @@ } ], "time": "2025-12-08T11:19:18+00:00" - }, - { - "name": "whichbrowser/parser", - "version": "v2.1.8", - "source": { - "type": "git", - "url": "https://github.com/WhichBrowser/Parser-PHP.git", - "reference": "581d614d686bfbec3529ad60562a5213ac5d8d72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/WhichBrowser/Parser-PHP/zipball/581d614d686bfbec3529ad60562a5213ac5d8d72", - "reference": "581d614d686bfbec3529ad60562a5213ac5d8d72", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/cache": "^1.0 || ^2.0 || ^3.0" - }, - "require-dev": { - "cache/array-adapter": "^1.1", - "icomefromthenet/reverse-regex": "0.0.6.3", - "php-coveralls/php-coveralls": "^2.0", - "phpunit/php-code-coverage": "^5.0 || ^7.0", - "phpunit/phpunit": "^6.0 || ^8.0", - "squizlabs/php_codesniffer": "^3.5", - "symfony/yaml": "~3.4 || ~4.0" - }, - "suggest": { - "cache/array-adapter": "Allows testing of the caching functionality" - }, - "type": "library", - "autoload": { - "psr-4": { - "WhichBrowser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Niels Leenheer", - "email": "niels@leenheer.nl", - "role": "Developer" - } - ], - "description": "Useragent sniffing library for PHP", - "homepage": "http://whichbrowser.net", - "keywords": [ - "browser", - "sniffing", - "ua", - "useragent" - ], - "support": { - "issues": "https://github.com/WhichBrowser/Parser-PHP/issues", - "source": "https://github.com/WhichBrowser/Parser-PHP/tree/v2.1.8" - }, - "time": "2024-04-17T12:47:41+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "qirolab/laravel-themer": 20 - }, + "stability-flags": {}, "prefer-stable": true, "prefer-lowest": false, "platform": { diff --git a/config/app.php b/config/app.php index c4b7457..dd23dee 100755 --- a/config/app.php +++ b/config/app.php @@ -222,6 +222,7 @@ return [ */ AppServiceProvider::class, App\Providers\AuthServiceProvider::class, + App\Providers\ThemeServiceProvider::class, // App\Providers\BroadcastServiceProvider::class, EventServiceProvider::class, AdminFilamentPanelProvider::class, diff --git a/database/migrations/2022_08_25_225959_change_user_id_on_website_articles_table.php b/database/migrations/2022_08_25_225959_change_user_id_on_website_articles_table.php index cdf2c9a..e28f813 100755 --- a/database/migrations/2022_08_25_225959_change_user_id_on_website_articles_table.php +++ b/database/migrations/2022_08_25_225959_change_user_id_on_website_articles_table.php @@ -1,15 +1,15 @@ integer('user_id')->nullable()->change(); $table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete(); }); } @@ -18,7 +18,7 @@ return new class extends Migration { Schema::table('website_articles', function (Blueprint $table) { $table->dropForeign(['user_id']); - $table->string('user_id')->change(); }); + DB::statement('ALTER TABLE website_articles MODIFY user_id VARCHAR(255) NOT NULL'); } }; diff --git a/database/migrations/2023_08_01_202051_update_features_column_on_website_shop_article_features_table.php b/database/migrations/2023_08_01_202051_update_features_column_on_website_shop_article_features_table.php index 539f98d..6212f9c 100755 --- a/database/migrations/2023_08_01_202051_update_features_column_on_website_shop_article_features_table.php +++ b/database/migrations/2023_08_01_202051_update_features_column_on_website_shop_article_features_table.php @@ -15,9 +15,7 @@ return new class extends Migration $table->renameColumn('features', 'content'); }); - Schema::table('website_shop_article_features', function (Blueprint $table) { - $table->string('content')->change(); - }); + DB::statement('ALTER TABLE website_shop_article_features MODIFY content VARCHAR(255) NOT NULL'); } public function down(): void diff --git a/database/migrations/2023_09_13_130322_update_password_reset_tokens_created_at.php b/database/migrations/2023_09_13_130322_update_password_reset_tokens_created_at.php index 82554d3..503dbf9 100755 --- a/database/migrations/2023_09_13_130322_update_password_reset_tokens_created_at.php +++ b/database/migrations/2023_09_13_130322_update_password_reset_tokens_created_at.php @@ -1,24 +1,16 @@ timestamp('created_at')->useCurrent()->change(); - }); + DB::statement('ALTER TABLE password_reset_tokens MODIFY created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL'); } - /** - * Reverse the migrations. - */ public function down(): void { // diff --git a/database/migrations/2024_06_16_184358_change_value_column_type_on_website_settings_table.php b/database/migrations/2024_06_16_184358_change_value_column_type_on_website_settings_table.php index fa85551..6662d83 100755 --- a/database/migrations/2024_06_16_184358_change_value_column_type_on_website_settings_table.php +++ b/database/migrations/2024_06_16_184358_change_value_column_type_on_website_settings_table.php @@ -1,22 +1,18 @@ text('value')->change(); - }); + DB::statement('ALTER TABLE website_settings MODIFY value TEXT NOT NULL'); } public function down(): void { - Schema::table('website_settings', function (Blueprint $table) { - $table->string('value')->change(); - }); + DB::statement('ALTER TABLE website_settings MODIFY value VARCHAR(255) NOT NULL'); } }; diff --git a/database/migrations/2024_12_31_113038_update_subject_id_column_in_activity_log_table.php b/database/migrations/2024_12_31_113038_update_subject_id_column_in_activity_log_table.php index eb50c2e..2a1398f 100755 --- a/database/migrations/2024_12_31_113038_update_subject_id_column_in_activity_log_table.php +++ b/database/migrations/2024_12_31_113038_update_subject_id_column_in_activity_log_table.php @@ -1,22 +1,18 @@ string('subject_id')->change(); - }); + DB::statement('ALTER TABLE activity_log MODIFY subject_id VARCHAR(255) NOT NULL'); } public function down() { - Schema::table('activity_log', function (Blueprint $table) { - $table->integer('subject_id')->change(); - }); + DB::statement('ALTER TABLE activity_log MODIFY subject_id INT NOT NULL'); } } diff --git a/database/migrations/2026_04_04_000000_add_missing_indexes_for_performance.php b/database/migrations/2026_04_04_000000_add_missing_indexes_for_performance.php index 45d99c5..46bfc80 100755 --- a/database/migrations/2026_04_04_000000_add_missing_indexes_for_performance.php +++ b/database/migrations/2026_04_04_000000_add_missing_indexes_for_performance.php @@ -9,11 +9,7 @@ return new class extends Migration public function up(): void { Schema::table('game_rooms', function (Blueprint $table) { - if (! Schema::hasColumn('game_rooms', 'status')) { - $table->string('status')->index()->change(); - } else { - $table->index('status', 'idx_game_rooms_status'); - } + $table->index('status', 'idx_game_rooms_status'); $table->index('game', 'idx_game_rooms_game'); }); diff --git a/database/migrations/2026_05_20_210737_increase_password_column_length_for_argon2id.php b/database/migrations/2026_05_20_210737_increase_password_column_length_for_argon2id.php index ce56688..9c0695e 100755 --- a/database/migrations/2026_05_20_210737_increase_password_column_length_for_argon2id.php +++ b/database/migrations/2026_05_20_210737_increase_password_column_length_for_argon2id.php @@ -3,22 +3,18 @@ declare(strict_types=1); use Illuminate\Database\Migrations\Migration; -use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; return new class extends Migration { public function up(): void { - Schema::table('users', function (Blueprint $table) { - $table->string('password', 255)->change(); - }); + DB::statement('ALTER TABLE users MODIFY password VARCHAR(255) NOT NULL'); } public function down(): void { - Schema::table('users', function (Blueprint $table) { - $table->string('password', 60)->change(); - }); + DB::statement('ALTER TABLE users MODIFY password VARCHAR(60) NOT NULL'); } }; diff --git a/database/migrations/2026_06_08_000001_fix_null_last_username_change_on_users_table.php b/database/migrations/2026_06_08_000001_fix_null_last_username_change_on_users_table.php index 1bfa854..8edb20e 100644 --- a/database/migrations/2026_06_08_000001_fix_null_last_username_change_on_users_table.php +++ b/database/migrations/2026_06_08_000001_fix_null_last_username_change_on_users_table.php @@ -1,7 +1,6 @@ orWhere('last_username_change', 0) ->update(['last_username_change' => 0]); - Schema::table('users', function (Blueprint $table) { - $table->integer('last_username_change')->default(0)->change(); - }); + DB::statement('ALTER TABLE users MODIFY last_username_change INT DEFAULT 0 NOT NULL'); } public function down(): void