diff --git a/.env.example b/.env.example index 478972c..ac45dd9 100644 --- a/.env.example +++ b/.env.example @@ -1,58 +1,12 @@ -APP_NAME=Laravel +APP_NAME="Doe Sangue" APP_ENV=local APP_KEY= APP_DEBUG=true APP_URL=http://localhost -LOG_CHANNEL=stack -LOG_DEPRECATIONS_CHANNEL=null -LOG_LEVEL=debug - -DB_CONNECTION=mysql -DB_HOST=127.0.0.1 -DB_PORT=3306 +DB_CONNECTION=pgsql +DB_HOST=postgres +DB_PORT=5432 DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD= - -BROADCAST_DRIVER=log -CACHE_DRIVER=file -FILESYSTEM_DISK=local -QUEUE_CONNECTION=sync -SESSION_DRIVER=file -SESSION_LIFETIME=120 - -MEMCACHED_HOST=127.0.0.1 - -REDIS_HOST=127.0.0.1 -REDIS_PASSWORD=null -REDIS_PORT=6379 - -MAIL_MAILER=smtp -MAIL_HOST=mailpit -MAIL_PORT=1025 -MAIL_USERNAME=null -MAIL_PASSWORD=null -MAIL_ENCRYPTION=null -MAIL_FROM_ADDRESS="hello@example.com" -MAIL_FROM_NAME="${APP_NAME}" - -AWS_ACCESS_KEY_ID= -AWS_SECRET_ACCESS_KEY= -AWS_DEFAULT_REGION=us-east-1 -AWS_BUCKET= -AWS_USE_PATH_STYLE_ENDPOINT=false - -PUSHER_APP_ID= -PUSHER_APP_KEY= -PUSHER_APP_SECRET= -PUSHER_HOST= -PUSHER_PORT=443 -PUSHER_SCHEME=https -PUSHER_APP_CLUSTER=mt1 - -VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" -VITE_PUSHER_HOST="${PUSHER_HOST}" -VITE_PUSHER_PORT="${PUSHER_PORT}" -VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" -VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/app/Filament/Pages/Login.php b/app/Filament/Pages/Login.php new file mode 100644 index 0000000..01b2a3f --- /dev/null +++ b/app/Filament/Pages/Login.php @@ -0,0 +1,21 @@ +environment('local')) { + $this->form->fill([ + 'email' => 'test@example.com', + 'password' => 'password', + 'remember' => true, + ]); + } + } +} diff --git a/composer.json b/composer.json index 0b45dd1..181b487 100644 --- a/composer.json +++ b/composer.json @@ -6,6 +6,7 @@ "license": "MIT", "require": { "php": "^8.1", + "filament/filament": "^2.0", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^10.10", "laravel/sanctum": "^3.2", @@ -38,7 +39,8 @@ "@php artisan package:discover --ansi" ], "post-update-cmd": [ - "@php artisan vendor:publish --tag=laravel-assets --ansi --force" + "@php artisan vendor:publish --tag=laravel-assets --ansi --force", + "@php artisan filament:upgrade" ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" diff --git a/composer.lock b/composer.lock index d659df8..90fff7b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,227 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "aa322c53454393ed775cfe4807d54a50", + "content-hash": "50cda332b8d87575e3509095770ae87f", "packages": [ + { + "name": "akaunting/laravel-money", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/akaunting/laravel-money.git", + "reference": "df99d0f5d415490ef7e79362c3b694e8cc8af903" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/akaunting/laravel-money/zipball/df99d0f5d415490ef7e79362c3b694e8cc8af903", + "reference": "df99d0f5d415490ef7e79362c3b694e8cc8af903", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^9.0|^10.0", + "illuminate/support": "^9.0|^10.0", + "illuminate/validation": "^9.0|^10.0", + "illuminate/view": "^9.0|^10.0", + "php": "^8.0", + "vlucas/phpdotenv": "^5.4.1" + }, + "require-dev": { + "orchestra/testbench": "^7.4|^8.0", + "phpunit/phpunit": "^9.5|^10.0", + "vimeo/psalm": "^4.23" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Akaunting\\Money\\Provider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Akaunting\\Money\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Denis DuliΓ§i", + "email": "info@akaunting.com", + "homepage": "https://akaunting.com", + "role": "Developer" + } + ], + "description": "Currency formatting and conversion package for Laravel", + "keywords": [ + "convert", + "currency", + "format", + "laravel", + "money" + ], + "support": { + "issues": "https://github.com/akaunting/laravel-money/issues", + "source": "https://github.com/akaunting/laravel-money/tree/4.0.1" + }, + "time": "2023-03-16T14:39:27+00:00" + }, + { + "name": "blade-ui-kit/blade-heroicons", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/blade-ui-kit/blade-heroicons.git", + "reference": "dea08e8308d9bad9ebff1bc482d5985dbaacc91b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/blade-ui-kit/blade-heroicons/zipball/dea08e8308d9bad9ebff1bc482d5985dbaacc91b", + "reference": "dea08e8308d9bad9ebff1bc482d5985dbaacc91b", + "shasum": "" + }, + "require": { + "blade-ui-kit/blade-icons": "^1.1", + "illuminate/support": "^8.0|^9.0|^10.0", + "php": "^7.4|^8.0" + }, + "require-dev": { + "orchestra/testbench": "^6.0|^7.0|^8.0", + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "BladeUI\\Heroicons\\BladeHeroiconsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "BladeUI\\Heroicons\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dries Vints", + "homepage": "https://driesvints.com" + } + ], + "description": "A package to easily make use of Heroicons in your Laravel Blade views.", + "homepage": "https://github.com/blade-ui-kit/blade-heroicons", + "keywords": [ + "Heroicons", + "blade", + "laravel" + ], + "support": { + "issues": "https://github.com/blade-ui-kit/blade-heroicons/issues", + "source": "https://github.com/blade-ui-kit/blade-heroicons/tree/1.4.0" + }, + "funding": [ + { + "url": "https://github.com/caneco", + "type": "github" + }, + { + "url": "https://github.com/driesvints", + "type": "github" + } + ], + "time": "2023-01-25T17:57:58+00:00" + }, + { + "name": "blade-ui-kit/blade-icons", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/blade-ui-kit/blade-icons.git", + "reference": "b2a80ff2a26641f64bfee48ad0d2a922ce781228" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/blade-ui-kit/blade-icons/zipball/b2a80ff2a26641f64bfee48ad0d2a922ce781228", + "reference": "b2a80ff2a26641f64bfee48ad0d2a922ce781228", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0|^9.0|^10.0", + "illuminate/filesystem": "^8.0|^9.0|^10.0", + "illuminate/support": "^8.0|^9.0|^10.0", + "illuminate/view": "^8.0|^9.0|^10.0", + "php": "^7.4|^8.0", + "symfony/console": "^5.3|^6.0", + "symfony/finder": "^5.3|^6.0" + }, + "require-dev": { + "mockery/mockery": "^1.3", + "orchestra/testbench": "^6.0|^7.0|^8.0", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/blade-icons-generate" + ], + "type": "library", + "extra": { + "laravel": { + "providers": [ + "BladeUI\\Icons\\BladeIconsServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "BladeUI\\Icons\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dries Vints", + "homepage": "https://driesvints.com" + } + ], + "description": "A package to easily make use of icons in your Laravel Blade views.", + "homepage": "https://github.com/blade-ui-kit/blade-icons", + "keywords": [ + "blade", + "icons", + "laravel", + "svg" + ], + "support": { + "issues": "https://github.com/blade-ui-kit/blade-icons/issues", + "source": "https://github.com/blade-ui-kit/blade-icons" + }, + "funding": [ + { + "url": "https://github.com/caneco", + "type": "github" + }, + { + "url": "https://github.com/driesvints", + "type": "github" + } + ], + "time": "2023-02-15T16:30:12+00:00" + }, { "name": "brick/math", "version": "0.11.0", @@ -61,6 +280,110 @@ ], "time": "2023-01-15T23:15:59+00:00" }, + { + "name": "danharrin/date-format-converter", + "version": "v0.3.0", + "source": { + "type": "git", + "url": "https://github.com/danharrin/date-format-converter.git", + "reference": "42b6ddc52059d4ba228a67c15adaaa0c039e75f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danharrin/date-format-converter/zipball/42b6ddc52059d4ba228a67c15adaaa0c039e75f2", + "reference": "42b6ddc52059d4ba228a67c15adaaa0c039e75f2", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/helpers.php", + "src/standards.php" + ], + "psr-4": { + "DanHarrin\\DateFormatConverter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dan Harrin", + "email": "dan@danharrin.com" + } + ], + "description": "Convert token-based date formats between standards.", + "homepage": "https://github.com/danharrin/date-format-converter", + "support": { + "issues": "https://github.com/danharrin/date-format-converter/issues", + "source": "https://github.com/danharrin/date-format-converter" + }, + "funding": [ + { + "url": "https://github.com/danharrin", + "type": "github" + } + ], + "time": "2022-09-29T07:48:20+00:00" + }, + { + "name": "danharrin/livewire-rate-limiting", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/danharrin/livewire-rate-limiting.git", + "reference": "a55996683cabf2e93893280d602191243b3b80b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danharrin/livewire-rate-limiting/zipball/a55996683cabf2e93893280d602191243b3b80b8", + "reference": "a55996683cabf2e93893280d602191243b3b80b8", + "shasum": "" + }, + "require": { + "illuminate/support": "^9.0|^10.0", + "php": "^8.0" + }, + "require-dev": { + "livewire/livewire": "^2.3", + "orchestra/testbench": "^7.0|^8.0", + "phpunit/phpunit": "^9.0|^10.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "DanHarrin\\LivewireRateLimiting\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dan Harrin", + "email": "dan@danharrin.com" + } + ], + "description": "Apply rate limiters to Laravel Livewire actions.", + "homepage": "https://github.com/danharrin/livewire-rate-limiting", + "support": { + "issues": "https://github.com/danharrin/livewire-rate-limiting/issues", + "source": "https://github.com/danharrin/livewire-rate-limiting" + }, + "funding": [ + { + "url": "https://github.com/danharrin", + "type": "github" + } + ], + "time": "2023-03-12T12:17:29+00:00" + }, { "name": "dflydev/dot-access-data", "version": "v3.0.2", @@ -302,135 +625,415 @@ "type": "tidelift" } ], - "time": "2022-12-15T16:57:16+00:00" + "time": "2022-12-15T16:57:16+00:00" + }, + { + "name": "dragonmantank/cron-expression", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/dragonmantank/cron-expression.git", + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8", + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0", + "webmozart/assert": "^1.0" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-webmozart-assert": "^1.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Tankersley", + "email": "chris@ctankersley.com", + "homepage": "https://github.com/dragonmantank" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "support": { + "issues": "https://github.com/dragonmantank/cron-expression/issues", + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2" + }, + "funding": [ + { + "url": "https://github.com/dragonmantank", + "type": "github" + } + ], + "time": "2022-09-10T18:51:20+00:00" + }, + { + "name": "egulias/email-validator", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/3a85486b709bc384dae8eb78fb2eec649bdb64ff", + "reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^2.0 || ^3.0", + "php": ">=8.1", + "symfony/polyfill-intl-idn": "^1.26" + }, + "require-dev": { + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^4.30" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ], + "support": { + "issues": "https://github.com/egulias/EmailValidator/issues", + "source": "https://github.com/egulias/EmailValidator/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/egulias", + "type": "github" + } + ], + "time": "2023-01-14T14:17:03+00:00" + }, + { + "name": "filament/filament", + "version": "v2.17.44", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/panels.git", + "reference": "a7658bd50da4b35322f1c1616de4b6abd7a6b7a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/a7658bd50da4b35322f1c1616de4b6abd7a6b7a8", + "reference": "a7658bd50da4b35322f1c1616de4b6abd7a6b7a8", + "shasum": "" + }, + "require": { + "danharrin/livewire-rate-limiting": "^0.3|^1.0", + "filament/forms": "self.version", + "filament/notifications": "self.version", + "filament/support": "self.version", + "filament/tables": "self.version", + "illuminate/auth": "^8.6|^9.0|^10.0", + "illuminate/console": "^8.6|^9.0|^10.0", + "illuminate/contracts": "^8.6|^9.0|^10.0", + "illuminate/cookie": "^8.6|^9.0|^10.0", + "illuminate/database": "^8.6|^9.0|^10.0", + "illuminate/http": "^8.6|^9.0|^10.0", + "illuminate/routing": "^8.6|^9.0|^10.0", + "illuminate/session": "^8.6|^9.0|^10.0", + "illuminate/support": "^8.6|^9.0|^10.0", + "illuminate/view": "^8.6|^9.0|^10.0", + "livewire/livewire": "^2.10.7", + "php": "^8.0", + "ryangjchandler/blade-capture-directive": "^0.2|^0.3", + "spatie/laravel-package-tools": "^1.9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\FilamentServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Filament\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Effortlessly build TALL-powered admin panels.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2023-05-30T10:44:54+00:00" + }, + { + "name": "filament/forms", + "version": "v2.17.44", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/forms.git", + "reference": "c6b5d4f04716f14a4d5f63f76c8b94df8029a17f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/c6b5d4f04716f14a4d5f63f76c8b94df8029a17f", + "reference": "c6b5d4f04716f14a4d5f63f76c8b94df8029a17f", + "shasum": "" + }, + "require": { + "blade-ui-kit/blade-heroicons": "^1.2", + "danharrin/date-format-converter": "^0.3", + "filament/notifications": "self.version", + "filament/support": "self.version", + "illuminate/console": "^8.6|^9.0|^10.0", + "illuminate/contracts": "^8.6|^9.0|^10.0", + "illuminate/database": "^8.6|^9.0|^10.0", + "illuminate/filesystem": "^8.6|^9.0|^10.0", + "illuminate/support": "^8.6|^9.0|^10.0", + "illuminate/validation": "^8.6|^9.0|^10.0", + "illuminate/view": "^8.6|^9.0|^10.0", + "livewire/livewire": "^2.10.7", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\Forms\\FormsServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Filament\\Forms\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Effortlessly build TALL-powered forms.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2023-05-30T10:44:57+00:00" + }, + { + "name": "filament/notifications", + "version": "v2.17.44", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/notifications.git", + "reference": "a9bee8c8b7cdf1df798311acdf57895d73dd3af7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/notifications/zipball/a9bee8c8b7cdf1df798311acdf57895d73dd3af7", + "reference": "a9bee8c8b7cdf1df798311acdf57895d73dd3af7", + "shasum": "" + }, + "require": { + "blade-ui-kit/blade-heroicons": "^1.2", + "filament/support": "self.version", + "illuminate/contracts": "^8.6|^9.0|^10.0", + "illuminate/filesystem": "^8.6|^9.0|^10.0", + "illuminate/notifications": "^8.6|^9.0|^10.0", + "illuminate/support": "^8.6|^9.0|^10.0", + "livewire/livewire": "^2.10.7", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\Notifications\\NotificationsServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/Testing/Autoload.php" + ], + "psr-4": { + "Filament\\Notifications\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Effortlessly build TALL-powered notifications.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2023-05-30T10:44:51+00:00" }, { - "name": "dragonmantank/cron-expression", - "version": "v3.3.2", + "name": "filament/support", + "version": "v2.17.44", "source": { "type": "git", - "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8" + "url": "https://github.com/filamentphp/support.git", + "reference": "fe7434dd07b254de0d9cc7d9178540ad8b087cca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8", - "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8", + "url": "https://api.github.com/repos/filamentphp/support/zipball/fe7434dd07b254de0d9cc7d9178540ad8b087cca", + "reference": "fe7434dd07b254de0d9cc7d9178540ad8b087cca", "shasum": "" }, "require": { - "php": "^7.2|^8.0", - "webmozart/assert": "^1.0" - }, - "replace": { - "mtdowling/cron-expression": "^1.0" - }, - "require-dev": { - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-webmozart-assert": "^1.0", - "phpunit/phpunit": "^7.0|^8.0|^9.0" + "illuminate/contracts": "^8.6|^9.0|^10.0", + "illuminate/support": "^8.6|^9.0|^10.0", + "illuminate/view": "^8.6|^9.0|^10.0", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.9", + "tgalopin/html-sanitizer": "^1.5" }, "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\Support\\SupportServiceProvider" + ] + } + }, "autoload": { + "files": [ + "src/helpers.php" + ], "psr-4": { - "Cron\\": "src/Cron/" + "Filament\\Support\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Chris Tankersley", - "email": "chris@ctankersley.com", - "homepage": "https://github.com/dragonmantank" - } - ], - "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", - "keywords": [ - "cron", - "schedule" - ], + "description": "Associated helper methods and foundation code for Filament packages.", + "homepage": "https://github.com/filamentphp/filament", "support": { - "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2" + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" }, - "funding": [ - { - "url": "https://github.com/dragonmantank", - "type": "github" - } - ], - "time": "2022-09-10T18:51:20+00:00" + "time": "2023-05-30T10:44:54+00:00" }, { - "name": "egulias/email-validator", - "version": "4.0.1", + "name": "filament/tables", + "version": "v2.17.44", "source": { "type": "git", - "url": "https://github.com/egulias/EmailValidator.git", - "reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff" + "url": "https://github.com/filamentphp/tables.git", + "reference": "57833d3f09c6ec5fbbabec5a0e47944b972ceaa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/3a85486b709bc384dae8eb78fb2eec649bdb64ff", - "reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/57833d3f09c6ec5fbbabec5a0e47944b972ceaa3", + "reference": "57833d3f09c6ec5fbbabec5a0e47944b972ceaa3", "shasum": "" }, "require": { - "doctrine/lexer": "^2.0 || ^3.0", - "php": ">=8.1", - "symfony/polyfill-intl-idn": "^1.26" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^4.30" - }, - "suggest": { - "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + "akaunting/laravel-money": "^1.2|^2.0|^3.0|^4.0", + "blade-ui-kit/blade-heroicons": "^1.2", + "filament/forms": "self.version", + "filament/notifications": "self.version", + "filament/support": "self.version", + "illuminate/console": "^8.6|^9.0|^10.0", + "illuminate/contracts": "^8.6|^9.0|^10.0", + "illuminate/database": "^8.6|^9.0|^10.0", + "illuminate/filesystem": "^8.6|^9.0|^10.0", + "illuminate/support": "^8.6|^9.0|^10.0", + "illuminate/view": "^8.6|^9.0|^10.0", + "livewire/livewire": "^2.10.7", + "php": "^8.0", + "spatie/invade": "^1.0", + "spatie/laravel-package-tools": "^1.9" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "4.0.x-dev" + "laravel": { + "providers": [ + "Filament\\Tables\\TablesServiceProvider" + ] } }, "autoload": { "psr-4": { - "Egulias\\EmailValidator\\": "src" + "Filament\\Tables\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Eduardo Gulias Davis" - } - ], - "description": "A library for validating emails against several RFCs", - "homepage": "https://github.com/egulias/EmailValidator", - "keywords": [ - "email", - "emailvalidation", - "emailvalidator", - "validation", - "validator" - ], + "description": "Effortlessly build TALL-powered tables.", + "homepage": "https://github.com/filamentphp/filament", "support": { - "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/4.0.1" + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" }, - "funding": [ - { - "url": "https://github.com/egulias", - "type": "github" - } - ], - "time": "2023-01-14T14:17:03+00:00" + "time": "2023-05-30T10:44:53+00:00" }, { "name": "fruitcake/php-cors", @@ -1645,29 +2248,239 @@ "time": "2023-05-04T09:04:26+00:00" }, { - "name": "league/flysystem-local", - "version": "3.15.0", + "name": "league/flysystem-local", + "version": "3.15.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-local.git", + "reference": "543f64c397fefdf9cfeac443ffb6beff602796b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/543f64c397fefdf9cfeac443ffb6beff602796b3", + "reference": "543f64c397fefdf9cfeac443ffb6beff602796b3", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/flysystem": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\Local\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Local filesystem adapter for Flysystem.", + "keywords": [ + "Flysystem", + "file", + "files", + "filesystem", + "local" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem-local/issues", + "source": "https://github.com/thephpleague/flysystem-local/tree/3.15.0" + }, + "funding": [ + { + "url": "https://ecologi.com/frankdejonge", + "type": "custom" + }, + { + "url": "https://github.com/frankdejonge", + "type": "github" + } + ], + "time": "2023-05-02T20:02:14+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" + }, + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2022-04-17T13:12:02+00:00" + }, + { + "name": "league/uri-parser", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-parser.git", + "reference": "671548427e4c932352d9b9279fdfa345bf63fa00" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-parser/zipball/671548427e4c932352d9b9279fdfa345bf63fa00", + "reference": "671548427e4c932352d9b9279fdfa345bf63fa00", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.0", + "phpstan/phpstan": "^0.9.2", + "phpstan/phpstan-phpunit": "^0.9.4", + "phpstan/phpstan-strict-rules": "^0.9.0", + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-intl": "Allow parsing RFC3987 compliant hosts", + "league/uri-schemes": "Allow validating and normalizing URI parsing results" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "League\\Uri\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "userland URI parser RFC 3986 compliant", + "homepage": "https://github.com/thephpleague/uri-parser", + "keywords": [ + "parse_url", + "parser", + "rfc3986", + "rfc3987", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/thephpleague/uri-parser/issues", + "source": "https://github.com/thephpleague/uri-parser/tree/master" + }, + "abandoned": true, + "time": "2018-11-22T07:55:51+00:00" + }, + { + "name": "livewire/livewire", + "version": "v2.12.3", "source": { "type": "git", - "url": "https://github.com/thephpleague/flysystem-local.git", - "reference": "543f64c397fefdf9cfeac443ffb6beff602796b3" + "url": "https://github.com/livewire/livewire.git", + "reference": "019b1e69d8cd8c7e749eba7a38e4fa69ecbc8f74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/543f64c397fefdf9cfeac443ffb6beff602796b3", - "reference": "543f64c397fefdf9cfeac443ffb6beff602796b3", + "url": "https://api.github.com/repos/livewire/livewire/zipball/019b1e69d8cd8c7e749eba7a38e4fa69ecbc8f74", + "reference": "019b1e69d8cd8c7e749eba7a38e4fa69ecbc8f74", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "league/flysystem": "^3.0.0", - "league/mime-type-detection": "^1.0.0", - "php": "^8.0.2" + "illuminate/database": "^7.0|^8.0|^9.0|^10.0", + "illuminate/support": "^7.0|^8.0|^9.0|^10.0", + "illuminate/validation": "^7.0|^8.0|^9.0|^10.0", + "league/mime-type-detection": "^1.9", + "php": "^7.2.5|^8.0", + "symfony/http-kernel": "^5.0|^6.0" + }, + "require-dev": { + "calebporzio/sushi": "^2.1", + "laravel/framework": "^7.0|^8.0|^9.0|^10.0", + "mockery/mockery": "^1.3.1", + "orchestra/testbench": "^5.0|^6.0|^7.0|^8.0", + "orchestra/testbench-dusk": "^5.2|^6.0|^7.0|^8.0", + "phpunit/phpunit": "^8.4|^9.0", + "psy/psysh": "@stable" }, "type": "library", + "extra": { + "laravel": { + "providers": [ + "Livewire\\LivewireServiceProvider" + ], + "aliases": { + "Livewire": "Livewire\\Livewire" + } + } + }, "autoload": { + "files": [ + "src/helpers.php" + ], "psr-4": { - "League\\Flysystem\\Local\\": "" + "Livewire\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1676,61 +2489,53 @@ ], "authors": [ { - "name": "Frank de Jonge", - "email": "info@frankdejonge.nl" + "name": "Caleb Porzio", + "email": "calebporzio@gmail.com" } ], - "description": "Local filesystem adapter for Flysystem.", - "keywords": [ - "Flysystem", - "file", - "files", - "filesystem", - "local" - ], + "description": "A front-end framework for Laravel.", "support": { - "issues": "https://github.com/thephpleague/flysystem-local/issues", - "source": "https://github.com/thephpleague/flysystem-local/tree/3.15.0" + "issues": "https://github.com/livewire/livewire/issues", + "source": "https://github.com/livewire/livewire/tree/v2.12.3" }, "funding": [ { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" - }, - { - "url": "https://github.com/frankdejonge", + "url": "https://github.com/livewire", "type": "github" } ], - "time": "2023-05-02T20:02:14+00:00" + "time": "2023-03-03T20:12:38+00:00" }, { - "name": "league/mime-type-detection", - "version": "1.11.0", + "name": "masterminds/html5", + "version": "2.8.0", "source": { "type": "git", - "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" + "url": "https://github.com/Masterminds/html5-php.git", + "reference": "3c5d5a56d56f48a1ca08a0670f0f80c1dad368f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/3c5d5a56d56f48a1ca08a0670f0f80c1dad368f3", + "reference": "3c5d5a56d56f48a1ca08a0670f0f80c1dad368f3", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "php": "^7.2 || ^8.0" + "ext-dom": "*", + "php": ">=5.3.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.2", - "phpstan/phpstan": "^0.12.68", - "phpunit/phpunit": "^8.5.8 || ^9.3" + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, "autoload": { "psr-4": { - "League\\MimeTypeDetection\\": "src" + "Masterminds\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1739,26 +2544,34 @@ ], "authors": [ { - "name": "Frank de Jonge", - "email": "info@frankdejonge.nl" - } - ], - "description": "Mime-type detection for Flysystem", - "support": { - "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" - }, - "funding": [ + "name": "Matt Butcher", + "email": "technosophos@gmail.com" + }, { - "url": "https://github.com/frankdejonge", - "type": "github" + "name": "Matt Farina", + "email": "matt@mattfarina.com" }, { - "url": "https://tidelift.com/funding/github/packagist/league/flysystem", - "type": "tidelift" + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" } ], - "time": "2022-04-17T13:12:02+00:00" + "description": "An HTML5 parser and serializer.", + "homepage": "http://masterminds.github.io/html5-php", + "keywords": [ + "HTML5", + "dom", + "html", + "parser", + "querypath", + "serializer", + "xml" + ], + "support": { + "issues": "https://github.com/Masterminds/html5-php/issues", + "source": "https://github.com/Masterminds/html5-php/tree/2.8.0" + }, + "time": "2023-04-26T07:27:39+00:00" }, { "name": "monolog/monolog", @@ -2994,6 +3807,210 @@ ], "time": "2023-04-15T23:01:58+00:00" }, + { + "name": "ryangjchandler/blade-capture-directive", + "version": "v0.3.0", + "source": { + "type": "git", + "url": "https://github.com/ryangjchandler/blade-capture-directive.git", + "reference": "62fd2ecb50b938a46025093bcb64fcaddd531f89" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ryangjchandler/blade-capture-directive/zipball/62fd2ecb50b938a46025093bcb64fcaddd531f89", + "reference": "62fd2ecb50b938a46025093bcb64fcaddd531f89", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^9.0|^10.0", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.9.2" + }, + "require-dev": { + "nunomaduro/collision": "^6.0|^7.0", + "nunomaduro/larastan": "^2.0", + "orchestra/testbench": "^7.22|^8.0", + "pestphp/pest": "^1.21", + "pestphp/pest-plugin-laravel": "^1.1", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5", + "spatie/laravel-ray": "^1.26" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "RyanChandler\\BladeCaptureDirective\\BladeCaptureDirectiveServiceProvider" + ], + "aliases": { + "BladeCaptureDirective": "RyanChandler\\BladeCaptureDirective\\Facades\\BladeCaptureDirective" + } + } + }, + "autoload": { + "psr-4": { + "RyanChandler\\BladeCaptureDirective\\": "src", + "RyanChandler\\BladeCaptureDirective\\Database\\Factories\\": "database/factories" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ryan Chandler", + "email": "support@ryangjchandler.co.uk", + "role": "Developer" + } + ], + "description": "Create inline partials in your Blade templates with ease.", + "homepage": "https://github.com/ryangjchandler/blade-capture-directive", + "keywords": [ + "blade-capture-directive", + "laravel", + "ryangjchandler" + ], + "support": { + "issues": "https://github.com/ryangjchandler/blade-capture-directive/issues", + "source": "https://github.com/ryangjchandler/blade-capture-directive/tree/v0.3.0" + }, + "funding": [ + { + "url": "https://github.com/ryangjchandler", + "type": "github" + } + ], + "time": "2023-02-14T16:54:54+00:00" + }, + { + "name": "spatie/invade", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/invade.git", + "reference": "d0a9c895a96152549d478a7e3420e19039eef038" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/invade/zipball/d0a9c895a96152549d478a7e3420e19039eef038", + "reference": "d0a9c895a96152549d478a7e3420e19039eef038", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "pestphp/pest": "^1.20", + "phpstan/phpstan": "^1.4", + "spatie/ray": "^1.28" + }, + "type": "library", + "extra": { + "phpstan": { + "includes": [ + "phpstan-extension.neon" + ] + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Spatie\\Invade\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "role": "Developer" + } + ], + "description": "A PHP function to work with private properties and methods", + "homepage": "https://github.com/spatie/invade", + "keywords": [ + "invade", + "spatie" + ], + "support": { + "source": "https://github.com/spatie/invade/tree/1.1.1" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-07-05T09:31:00+00:00" + }, + { + "name": "spatie/laravel-package-tools", + "version": "1.15.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-package-tools.git", + "reference": "efab1844b8826443135201c4443690f032c3d533" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/efab1844b8826443135201c4443690f032c3d533", + "reference": "efab1844b8826443135201c4443690f032c3d533", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^9.28|^10.0", + "php": "^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.5", + "orchestra/testbench": "^7.7|^8.0", + "pestphp/pest": "^1.22", + "phpunit/phpunit": "^9.5.24", + "spatie/pest-plugin-test-time": "^1.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\LaravelPackageTools\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "role": "Developer" + } + ], + "description": "Tools for creating Laravel packages", + "homepage": "https://github.com/spatie/laravel-package-tools", + "keywords": [ + "laravel-package-tools", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/laravel-package-tools/issues", + "source": "https://github.com/spatie/laravel-package-tools/tree/1.15.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2023-04-27T08:09:01+00:00" + }, { "name": "symfony/console", "version": "v6.3.0", @@ -5237,6 +6254,55 @@ ], "time": "2023-05-25T13:09:35+00:00" }, + { + "name": "tgalopin/html-sanitizer", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/tgalopin/html-sanitizer.git", + "reference": "5d02dcb6f2ea4f505731eac440798caa1b3b0913" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tgalopin/html-sanitizer/zipball/5d02dcb6f2ea4f505731eac440798caa1b3b0913", + "reference": "5d02dcb6f2ea4f505731eac440798caa1b3b0913", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "league/uri-parser": "^1.4.1", + "masterminds/html5": "^2.4", + "php": ">=7.1", + "psr/log": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.4", + "symfony/var-dumper": "^4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "HtmlSanitizer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Titouan Galopin", + "email": "galopintitouan@gmail.com" + } + ], + "description": "Sanitize untrustworthy HTML user input", + "support": { + "issues": "https://github.com/tgalopin/html-sanitizer/issues", + "source": "https://github.com/tgalopin/html-sanitizer/tree/1.5.0" + }, + "abandoned": "symfony/html-sanitizer", + "time": "2021-09-14T08:27:50+00:00" + }, { "name": "tijsverkoyen/css-to-inline-styles", "version": "2.2.6", diff --git a/config/filament.php b/config/filament.php new file mode 100644 index 0000000..024ead8 --- /dev/null +++ b/config/filament.php @@ -0,0 +1,334 @@ + env('FILAMENT_PATH', 'admin'), + + /* + |-------------------------------------------------------------------------- + | Filament Core Path + |-------------------------------------------------------------------------- + | + | This is the path which Filament will use to load its core routes and assets. + | You may change it if it conflicts with your other routes. + | + */ + + 'core_path' => env('FILAMENT_CORE_PATH', 'filament'), + + /* + |-------------------------------------------------------------------------- + | Filament Domain + |-------------------------------------------------------------------------- + | + | You may change the domain where Filament should be active. If the domain + | is empty, all domains will be valid. + | + */ + + 'domain' => env('FILAMENT_DOMAIN'), + + /* + |-------------------------------------------------------------------------- + | Homepage URL + |-------------------------------------------------------------------------- + | + | This is the URL that Filament will redirect the user to when they click + | on the sidebar's header. + | + */ + + 'home_url' => '/', + + /* + |-------------------------------------------------------------------------- + | Brand Name + |-------------------------------------------------------------------------- + | + | This will be displayed on the login page and in the sidebar's header. + | + */ + + 'brand' => env('APP_NAME'), + + /* + |-------------------------------------------------------------------------- + | Auth + |-------------------------------------------------------------------------- + | + | This is the configuration that Filament will use to handle authentication + | into the admin panel. + | + */ + + 'auth' => [ + 'guard' => env('FILAMENT_AUTH_GUARD', 'web'), + 'pages' => [ + 'login' => \App\Filament\Pages\Login::class, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Pages + |-------------------------------------------------------------------------- + | + | This is the namespace and directory that Filament will automatically + | register pages from. You may also register pages here. + | + */ + + 'pages' => [ + 'namespace' => 'App\\Filament\\Pages', + 'path' => app_path('Filament/Pages'), + 'register' => [ + Pages\Dashboard::class, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Resources + |-------------------------------------------------------------------------- + | + | This is the namespace and directory that Filament will automatically + | register resources from. You may also register resources here. + | + */ + + 'resources' => [ + 'namespace' => 'App\\Filament\\Resources', + 'path' => app_path('Filament/Resources'), + 'register' => [], + ], + + /* + |-------------------------------------------------------------------------- + | Widgets + |-------------------------------------------------------------------------- + | + | This is the namespace and directory that Filament will automatically + | register dashboard widgets from. You may also register widgets here. + | + */ + + 'widgets' => [ + 'namespace' => 'App\\Filament\\Widgets', + 'path' => app_path('Filament/Widgets'), + 'register' => [ + Widgets\AccountWidget::class, + Widgets\FilamentInfoWidget::class, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Livewire + |-------------------------------------------------------------------------- + | + | This is the namespace and directory that Filament will automatically + | register Livewire components inside. + | + */ + + 'livewire' => [ + 'namespace' => 'App\\Filament', + 'path' => app_path('Filament'), + ], + + /* + |-------------------------------------------------------------------------- + | Dark mode + |-------------------------------------------------------------------------- + | + | By enabling this feature, your users are able to select between a light + | and dark appearance for the admin panel, or let their system decide. + | + */ + + 'dark_mode' => false, + + /* + |-------------------------------------------------------------------------- + | Database notifications + |-------------------------------------------------------------------------- + | + | By enabling this feature, your users are able to open a slide-over within + | the admin panel to view their database notifications. + | + */ + + 'database_notifications' => [ + 'enabled' => false, + 'polling_interval' => '30s', + ], + + /* + |-------------------------------------------------------------------------- + | Broadcasting + |-------------------------------------------------------------------------- + | + | By uncommenting the Laravel Echo configuration, you may connect your + | admin panel to any Pusher-compatible websockets server. + | + | This will allow your admin panel to receive real-time notifications. + | + */ + + 'broadcasting' => [ + + // 'echo' => [ + // 'broadcaster' => 'pusher', + // 'key' => env('VITE_PUSHER_APP_KEY'), + // 'cluster' => env('VITE_PUSHER_APP_CLUSTER'), + // 'forceTLS' => true, + // ], + + ], + + /* + |-------------------------------------------------------------------------- + | Layout + |-------------------------------------------------------------------------- + | + | This is the configuration for the general layout of the admin panel. + | + | You may configure the max content width from `xl` to `7xl`, or `full` + | for no max width. + | + */ + + 'layout' => [ + 'actions' => [ + 'modal' => [ + 'actions' => [ + 'alignment' => 'left', + ], + ], + ], + 'forms' => [ + 'actions' => [ + 'alignment' => 'left', + 'are_sticky' => false, + ], + 'have_inline_labels' => false, + ], + 'footer' => [ + 'should_show_logo' => false, + ], + 'max_content_width' => null, + 'notifications' => [ + 'vertical_alignment' => 'top', + 'alignment' => 'right', + ], + 'sidebar' => [ + 'is_collapsible_on_desktop' => false, + 'groups' => [ + 'are_collapsible' => true, + ], + 'width' => null, + 'collapsed_width' => null, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Favicon + |-------------------------------------------------------------------------- + | + | This is the path to the favicon used for pages in the admin panel. + | + */ + + 'favicon' => null, + + /* + |-------------------------------------------------------------------------- + | Default Avatar Provider + |-------------------------------------------------------------------------- + | + | This is the service that will be used to retrieve default avatars if one + | has not been uploaded. + | + */ + + 'default_avatar_provider' => \Filament\AvatarProviders\UiAvatarsProvider::class, + + /* + |-------------------------------------------------------------------------- + | Default Filesystem Disk + |-------------------------------------------------------------------------- + | + | This is the storage disk Filament will use to put media. You may use any + | of the disks defined in the `config/filesystems.php`. + | + */ + + 'default_filesystem_disk' => env('FILAMENT_FILESYSTEM_DRIVER', 'public'), + + /* + |-------------------------------------------------------------------------- + | Google Fonts + |-------------------------------------------------------------------------- + | + | This is the URL for Google Fonts that should be loaded. You may use any + | font, or set to `null` to prevent any Google Fonts from loading. + | + | When using a custom font, you should also set the font family in your + | custom theme's `tailwind.config.js` file. + | + */ + + 'google_fonts' => 'https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap', + + /* + |-------------------------------------------------------------------------- + | Middleware + |-------------------------------------------------------------------------- + | + | You may customize the middleware stack that Filament uses to handle + | requests. + | + */ + + 'middleware' => [ + 'auth' => [ + Authenticate::class, + ], + 'base' => [ + EncryptCookies::class, + AddQueuedCookiesToResponse::class, + StartSession::class, + AuthenticateSession::class, + ShareErrorsFromSession::class, + VerifyCsrfToken::class, + SubstituteBindings::class, + DispatchServingFilamentEvent::class, + MirrorConfigToSubpackages::class, + ], + ], + +]; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index a9f4519..b1f3193 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -14,9 +14,9 @@ public function run(): void { // \App\Models\User::factory(10)->create(); - // \App\Models\User::factory()->create([ - // 'name' => 'Test User', - // 'email' => 'test@example.com', - // ]); + \App\Models\User::factory()->create([ + 'name' => 'Test User', + 'email' => 'test@example.com', + ]); } } diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 0000000..d02b0d2 --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,28 @@ +version: '3.8' + +services: + webapp: + image: he4rt/blood-donation + build: + context: . + dockerfile: ./docker/dev-ssu/Dockerfile + ports: + - "${APP_PORT:-80}:80" + environment: + PUID: "${USERID:-1000}" + PGID: "${GROUPID:-1000}" + SSL_MODE: "off" + AUTORUN_LARAVEL_STORAGE_LINK: "false" + AUTORUN_LARAVEL_MIGRATION: "false" + volumes: + - .:/var/www/html + postgres: + ports: + - "${FORWARD_DB_PORT:-5432}:5432" + environment: + POSTGRES_USER: "${DB_USERNAME}" + POSTGRES_PASSWORD: "${DB_PASSWORD}" + POSTGRES_DB: "${DB_DATABASE}" + POSTGRES_HOST_AUTH_METHOD: "trust" + volumes: + - postgres:/var/lib/postgresql/data diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..162967c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3.8' +services: + webapp: + working_dir: /var/www/html + extra_hosts: + - 'host.docker.internal:host-gateway' + networks: + - web + + postgres: + image: postgres:15-alpine + networks: + - web +volumes: + postgres: +networks: + web: + driver: bridge diff --git a/docker/dev-ssu/Dockerfile b/docker/dev-ssu/Dockerfile new file mode 100644 index 0000000..77f16a3 --- /dev/null +++ b/docker/dev-ssu/Dockerfile @@ -0,0 +1,12 @@ +FROM serversideup/php:8.2-fpm-nginx +ARG POSTGRES_VERSION=15 +RUN apt-get update && apt-get install -y php-pgsql postgresql-client +RUN apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* + +COPY docker/dev-ssu/nginx.conf /etc/nginx/conf.d/custom.conf + +RUN echo "alias ll='ls -al'" >>/etc/bash.bashrc +RUN echo "alias a='php artisan'" >>/etc/bash.bashrc +RUN echo "alias mfs='php artisan migrate:fresh --seed'" >>/etc/bash.bashrc +RUN echo "alias cda='composer dump-autoload'" >>/etc/bash.bashrc +RUN echo "alias run='./scripts/run'" >>/etc/bash.bashrc diff --git a/docker/dev-ssu/nginx.conf b/docker/dev-ssu/nginx.conf new file mode 100644 index 0000000..60e1f96 --- /dev/null +++ b/docker/dev-ssu/nginx.conf @@ -0,0 +1,4 @@ +# Custom nginx configuration + +# Disable access logs +access_log off; \ No newline at end of file diff --git a/resources/views/filament/pages/login.blade.php b/resources/views/filament/pages/login.blade.php new file mode 100644 index 0000000..cd00daf --- /dev/null +++ b/resources/views/filament/pages/login.blade.php @@ -0,0 +1,3 @@ + + + diff --git a/run b/run new file mode 100755 index 0000000..a7ec5d0 --- /dev/null +++ b/run @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# Inspired on https://github.com/adriancooney/Taskfile + +set -e + +function help { + echo "$0 " + echo "Tasks:" + compgen -A function | cat -n +} +function default { + help +} +function mfs { # migrate-fresh-seed + bash scripts/spin exec -u webuser webapp php artisan migrate:fresh --seed +} +function webapp { + bash scripts/spin exec -u webuser webapp bash +} +function root-webapp { + bash scripts/spin exec webapp bash +} + +TIMEFORMAT="Task completed in %3lR" +time "${@:-default}" diff --git a/scripts/spin b/scripts/spin new file mode 100755 index 0000000..a1930da --- /dev/null +++ b/scripts/spin @@ -0,0 +1,310 @@ +#!/usr/bin/env bash + +# set -o xtrace + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +SPIN_HOME=$(dirname "$SCRIPT_DIR") #Assume the parent directory of this script is the home +AUTO_UPDATE_INTERVAL_IN_DAYS=${AUTO_UPDATE_INTERVAL_IN_DAYS:-14} +SPIN_CONFIG_FILE_LOCATION="$SPIN_HOME/conf/spin.conf" + +################################################ +# βš™οΈ FUNCTIONS: Common things that are called +################################################ + +check_for_upgrade() { + # Perform upgrades when not within update threshold, or if "--force" is passed + if [ ! is_within_update_threshold ] || [ "$1" == "--force" ] ; then + send_to_upgrade_script + else + # Silence is golden. We won't bug the user if everything looks good. + : + fi +} + +current_time_minus() { + # Accepts parameters: The first passed argument should be the number of days to subtract + # This will return a value of (current epoch time - number of days) + + local days_to_subtract + days_to_subtract=$1 + + # Check the OS, because the commands are different. + case "$(uname -s)" in + Linux*) DATE_THRESHOLD=$(date -d "now - ${days_to_subtract} days" +%s);; + Darwin*) DATE_THRESHOLD=$(date -v -${days_to_subtract}d +%s);; + *) echo "This operating system is not supported." && exit 2 + esac + + echo $DATE_THRESHOLD + +} + +is_within_update_threshold() { + if [ -f $SPIN_HOME/conf/last_update_check.lock ]; then + + CURRENT_EPOCH_SECONDS=$(date +%s) + if (( $(cat $SPIN_HOME/conf/last_update_check.lock) <= $(current_time_minus $AUTO_UPDATE_INTERVAL_IN_DAYS) )); then + return 1 + else + return 0 + fi + + else + return 1 + fi +} + +is_installed_to_user() { + if [ -f "$SPIN_HOME/conf/spin.conf" ]; then + return 0 + else + return 1 + fi +} + +is_internet_connected() { + local response + response=$(curl https://github.com/serversideup/spin/ --write-out %{http_code} --silent --output /dev/null --max-time 1) + + if [ $response -eq 200 ]; then + return 0 + else + printf "${BOLD}${YELLOW}\"spin\" tried to check for updates, but we couldn't connect to Github.com. We'll try again tomorrow.${RESET} \n" + # Take the current time and subtract just one day short of the auto update interval so we check again tomorrow + echo $(current_time_minus $(expr $AUTO_UPDATE_INTERVAL_IN_DAYS - 1)) > $SPIN_HOME/conf/last_update_check.lock + return 1 + fi +} + +print_version() { + + # Use the local Git repo to show our version + printf "${BOLD}${YELLOW}Spin Version:${RESET} \n" + printf "$(git -C $SPIN_HOME describe --tags) " + + # Show the track (if installed to the user) + if is_installed_to_user; then + source $SPIN_CONFIG_FILE_LOCATION + printf "[$TRACK] " + printf "(User Installed)\n" + else + printf "(Project Installed)\n" + fi +} + +send_to_upgrade_script () { + if is_internet_connected; then + source $SPIN_HOME/tools/upgrade.sh + fi +} + +setup_color() { + RAINBOW=" + $(printf '\033[38;5;196m') + $(printf '\033[38;5;202m') + $(printf '\033[38;5;226m') + $(printf '\033[38;5;082m') + " + RED=$(printf '\033[31m') + GREEN=$(printf '\033[32m') + YELLOW=$(printf '\033[33m') + BLUE=$(printf '\033[34m') + BOLD=$(printf '\033[1m') + RESET=$(printf '\033[m') +} + +################################################ +# 🏎 ACTIONS: Commands people can run +################################################ +action_build() { + shift 1 + + # Build the containers with `docker-compose` + $COMPOSE build "$@" +} + +action_debug(){ + + print_version + + # Show operating system version + printf "\n${BOLD}${YELLOW}Operating System Version:${RESET} \n" + case "$(uname -s)" in + Linux*) cat /etc/os-release;; + Darwin*) sw_vers;; + *) echo "This operating system is not supported." && exit 2 + esac + printf "\n" + + # Show docker version + printf "${BOLD}${BLUE}Docker Info:${RESET} \n" + printf "$(docker info)\n" + +} + +action_down() { + shift 1 + + # Bring down the containers with `docker-compose` + $COMPOSE down --remove-orphans "$@" +} + +action_exec(){ + shift 1 + + $COMPOSE exec $@ +} + +action_help(){ + echo "Help coming soon..." +} + +action_kill(){ + read -p "🚨 You're about to kill all running containers. Are you sure you want to do this? (Y) " -n 1 -r + echo # Move to a new line + + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + echo "Cancelling... Nothing with Docker was touched πŸ˜…" + exit 1 + fi + + echo "Stopping containers..." + docker stop $(docker ps -q) +} + +action_logs(){ + shift 1 + + $COMPOSE logs "$@" +} + +action_run(){ + shift 1 + + # Check for Internet connection before running a Docker pull + if is_internet_connected; then + $COMPOSE pull --ignore-pull-failures + fi + + # Run Docker Compose without dependencies. Ensure automations and S6 logging are disabled + $COMPOSE run --no-deps --rm \ + -e "AUTORUN_ENABLED=false" \ + -e "S6_LOGGING=1" \ + $@ +} + +action_up() { + shift 1 + + # Check for Internet connection before running a Docker pull + if is_internet_connected; then + $COMPOSE pull --ignore-pull-failures + fi + # Bring up the containers with `docker-compose` + $COMPOSE up --remove-orphans "$@" +} + +action_update() { + if is_installed_to_user; then + + if is_internet_connected; then + check_for_upgrade --force + fi + + else + printf "${BOLD}${YELLOW}⚠️ Cannot automatically peform an update.${RESET} " + printf "Your using \"spin\" from the project level. Install updates via NPM or Composer instead.\n" + exit 1 + fi +} + +action_version() { + print_version +} + +################################################ +# πŸš€ MAIN part of "spin" +################################################ +main() { + ## Set defaults for our environment + + # Select environment to be used, + # Allows passing as `ENV` environment variable, + # or defaults to `dev` + SPIN_ENV=${SPIN_ENV:-dev} + + # Export the compose file(s) to be used + # Allows overriding with standard `COMPOSE_FILE` environment variable + # or defaults to building compound from base and environment files + export COMPOSE_FILE=${COMPOSE_FILE:-"docker-compose.yml:docker-compose.$SPIN_ENV.yml"} + + # Set up our structure for our re-used commands + COMPOSE="docker compose" + + # Check that an argument is passed + if [ $# -gt 0 ]; then + # Check the first argument and pass the user to proper action, Only some actions need arguments passed. + case $1 in + build) + action_build "$@" + ;; + debug) + action_debug "$@" + ;; + down) + action_down "$@" + ;; + exec) + action_exec "$@" + ;; + help) + action_help + ;; + kill) + action_kill + ;; + logs) + action_logs "$@" + ;; + run) + action_run "$@" + ;; + up) + action_up "$@" + ;; + update) + action_update + ;; + version) + action_version + ;; + *) + echo "\"$1\" is not a valid command. Below are the commands available." + action_help + ;; + esac + else + printf "${BOLD}${YELLOW}\πŸ€” You didn't pass \"spin\" any arguments. Run \"spin help\" if you want to see the documentation.${RESET}" + fi +} + +################################################ +# Where the script actually starts +################################################ + +setup_color +if is_installed_to_user; then + # Prevent "spin update" from running updates twice + if [ "$1" != "update" ]; then + check_for_upgrade + fi +fi + +# Check that Docker is running +if ! docker info > /dev/null 2>&1; then + printf "${BOLD}${RED}❌ Docker is not running.${RESET} " + printf "You need to start Docker Desktop or install it before using \"spin\".\n" + exit 1 +fi + +main "$@" #Passing the original arguments to `main` \ No newline at end of file