diff --git a/app/Filament/Pages/ApiTokens.php b/app/Filament/Pages/ApiTokens.php new file mode 100644 index 000000000..6fcd5cb23 --- /dev/null +++ b/app/Filament/Pages/ApiTokens.php @@ -0,0 +1,138 @@ +state([ + 'token' => $this->token, + ]) + ->schema([ + Section::make() + ->columns(1) + ->schema([ + TextEntry::make('token') + ->label('API Token') + ->formatStateUsing(fn (string $state) => explode('|', $state)[1]) + ->helperText('Copy and save the token above, this token will not be shown again!') + ->color('gray') + ->copyable() + ->copyableState(fn (string $state) => explode('|', $state)[1]) + ->fontFamily(FontFamily::Mono), + ]), + ]); + } + + public function table(Table $table): Table + { + return $table + ->relationship(fn (): MorphMany => Auth::user()->tokens()) + ->headerActions([ + Action::make('createToken') + ->form([ + TextInput::make('token_name') + ->label('Name') + ->maxLength('100') + ->required(), + CheckboxList::make('token_abilities') + ->label('Abilities') + ->options([ + 'result-read' => 'Read results', + ]) + ->descriptions([ + 'result-read' => new HtmlString('Allow the token to retrieve result data.'), + ]) + ->required() + ->bulkToggleable(), + DateTimePicker::make('token_expires_at') + ->label('Expires at') + ->nullable(), + ]) + ->action(function (array $data) { + $token = Auth::user()->createToken( + name: $data['token_name'], + abilities: $data['token_abilities'], + expiresAt: $data['token_expires_at'] ? Carbon::parse($data['token_expires_at']) : null, + ); + + $this->token = $token->plainTextToken; + }) + ->label('Create API Token') + ->modal('createToken') + ->modalWidth(MaxWidth::ExtraLarge), + ]) + ->columns([ + TextColumn::make('id') + ->label('ID') + ->sortable(), + TextColumn::make('name') + ->searchable(), + TextColumn::make('last_used_at') + ->alignEnd() + ->dateTime() + ->sortable(), + TextColumn::make('expires_at') + ->alignEnd() + ->dateTime() + ->sortable(), + ]) + ->actions([ + ActionGroup::make([ + DeleteAction::make(), + ]), + ]) + ->bulkActions([ + // ... + ]); + } +} diff --git a/app/Helpers/Ookla.php b/app/Helpers/Ookla.php index 44b63fb5d..ca0fdf34e 100644 --- a/app/Helpers/Ookla.php +++ b/app/Helpers/Ookla.php @@ -12,22 +12,22 @@ class Ookla public static function getErrorMessage(ProcessFailedException $exception): string { $messages = explode(PHP_EOL, $exception->getMessage()); + $errorMessages = []; - // Extract only the "message" part from each JSON error message - $errorMessages = array_map(function ($message) { + foreach ($messages as $message) { $decoded = json_decode($message, true); if (json_last_error() === JSON_ERROR_NONE && isset($decoded['message'])) { - return $decoded['message']; + $errorMessages[] = $decoded['message']; } + } - // Placeholder for invalid JSON or missing "message" - return 'An unexpected error occurred while running the Ookla CLI.'; - }, $messages); - - // Filter out empty messages and concatenate - $errorMessage = implode(' | ', array_filter($errorMessages)); + // If no valid messages, use the placeholder + if (empty($errorMessages)) { + $errorMessages[] = 'An unexpected error occurred while running the Ookla CLI.'; + } - return $errorMessage; + // Remove duplicates and concatenate + return implode(' | ', array_unique($errorMessages)); } public static function getConfigServers(): ?array diff --git a/app/Jobs/Ookla/RunSpeedtestJob.php b/app/Jobs/Ookla/RunSpeedtestJob.php index 3b6ffbaef..a4d72d4a3 100644 --- a/app/Jobs/Ookla/RunSpeedtestJob.php +++ b/app/Jobs/Ookla/RunSpeedtestJob.php @@ -10,6 +10,7 @@ use Illuminate\Bus\Batchable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Queue\Queueable; +use Illuminate\Queue\Middleware\WithoutOverlapping; use Illuminate\Support\Arr; use Symfony\Component\Process\Exception\ProcessFailedException; use Symfony\Component\Process\Process; @@ -32,6 +33,16 @@ public function __construct( public Result $result, ) {} + /** + * Get the middleware the job should pass through. + * + * @return array + */ + public function middleware(): array + { + return [new WithoutOverlapping('run-speedtest')]; + } + /** * Execute the job. */ @@ -53,6 +64,7 @@ public function handle(): void '--accept-gdpr', '--format=json', $this->result->server_id ? '--server-id='.$this->result->server_id : null, + config('speedtest.interface') ? '--interface='.config('speedtest.interface') : null, ]); $process = new Process($command); diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 6097b4add..a944e97e2 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -6,6 +6,7 @@ use Illuminate\Cache\RateLimiting\Limit; use Illuminate\Foundation\Console\AboutCommand; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Blade; use Illuminate\Support\Facades\RateLimiter; use Illuminate\Support\Facades\URL; use Illuminate\Support\ServiceProvider; @@ -37,6 +38,8 @@ public function register(): void */ public function boot(): void { + $this->defineCustomIfStatements(); + RateLimiter::for('api', function (Request $request) { return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); }); @@ -52,4 +55,26 @@ public function boot(): void 'Out of date' => $system->isOutOfDate() ? 'Yes' : 'No', ]); } + + /** + * Define custom if statements, these were added to make the blade templates more readable. + * + * Ref: https://github.com/laravel/framework/pull/51561 + */ + protected function defineCustomIfStatements(): void + { + /** + * Adds blank() custom if statement. + */ + Blade::if('blank', function (mixed $value) { + return blank($value); + }); + + /** + * Adds filled() custom if statement. + */ + Blade::if('filled', function (mixed $value) { + return filled($value); + }); + } } diff --git a/composer.json b/composer.json index 8fb08b7e9..b88ee3d9f 100644 --- a/composer.json +++ b/composer.json @@ -24,25 +24,26 @@ "guzzlehttp/guzzle": "^7.9.2", "influxdata/influxdb-client-php": "^3.6", "laravel-notification-channels/telegram": "^5.0", - "laravel/framework": "^11.36.1", + "laravel/framework": "^11.37", "laravel/prompts": "^0.3.2", "laravel/sanctum": "^4.0.7", "laravel/tinker": "^2.10.0", - "livewire/livewire": "^3.5.17", - "lorisleiva/laravel-actions": "^2.8.4", + "livewire/livewire": "^3.5.18", + "lorisleiva/laravel-actions": "^2.8.5", "maennchen/zipstream-php": "^2.4", + "ryangjchandler/blade-tabler-icons": "^2.3", "spatie/laravel-settings": "^3.4", "spatie/laravel-webhook-server": "^3.8.2", "timokoerber/laravel-one-time-operations": "^1.4.4" }, "require-dev": { "fakerphp/faker": "^1.24.1", - "laravel/pint": "^1.18.3", + "laravel/pint": "^1.19.0", "laravel/sail": "^1.39.1", "laravel/telescope": "^5.2.6", "mockery/mockery": "^1.6.12", "nunomaduro/collision": "^8.5.0", - "phpunit/phpunit": "^11.5.1", + "phpunit/phpunit": "^11.5.2", "spatie/laravel-ignition": "^2.9.0", "tightenco/duster": "^3.1.0" }, diff --git a/composer.lock b/composer.lock index ebd736c25..d91bc332b 100644 --- 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": "9832b6f4e4ad294cd8cb7198af4fcc2c", + "content-hash": "e05743eacfe1aba91830e087df6cdfa8", "packages": [ { "name": "anourvalar/eloquent-serialize", @@ -1098,16 +1098,16 @@ }, { "name": "egulias/email-validator", - "version": "4.0.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e" + "reference": "b115554301161fa21467629f1e1391c1936de517" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ebaaf5be6c0286928352e054f2d5125608e5405e", - "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b115554301161fa21467629f1e1391c1936de517", + "reference": "b115554301161fa21467629f1e1391c1936de517", "shasum": "" }, "require": { @@ -1153,7 +1153,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/4.0.2" + "source": "https://github.com/egulias/EmailValidator/tree/4.0.3" }, "funding": [ { @@ -1161,7 +1161,7 @@ "type": "github" } ], - "time": "2023-10-06T06:47:41+00:00" + "time": "2024-12-27T00:36:43+00:00" }, { "name": "filament/actions", @@ -2411,16 +2411,16 @@ }, { "name": "laravel/framework", - "version": "v11.36.1", + "version": "v11.37.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "df06f5163f4550641fdf349ebc04916a61135a64" + "reference": "6cb103d2024b087eae207654b3f4b26646119ba5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/df06f5163f4550641fdf349ebc04916a61135a64", - "reference": "df06f5163f4550641fdf349ebc04916a61135a64", + "url": "https://api.github.com/repos/laravel/framework/zipball/6cb103d2024b087eae207654b3f4b26646119ba5", + "reference": "6cb103d2024b087eae207654b3f4b26646119ba5", "shasum": "" }, "require": { @@ -2470,7 +2470,6 @@ "voku/portable-ascii": "^2.0.2" }, "conflict": { - "mockery/mockery": "1.6.8", "tightenco/collect": "<5.5.33" }, "provide": { @@ -2622,7 +2621,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-12-17T22:32:08+00:00" + "time": "2025-01-02T20:10:21+00:00" }, { "name": "laravel/prompts", @@ -2876,16 +2875,16 @@ }, { "name": "league/commonmark", - "version": "2.6.0", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "d150f911e0079e90ae3c106734c93137c184f932" + "reference": "d990688c91cedfb69753ffc2512727ec646df2ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d150f911e0079e90ae3c106734c93137c184f932", - "reference": "d150f911e0079e90ae3c106734c93137c184f932", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d990688c91cedfb69753ffc2512727ec646df2ad", + "reference": "d990688c91cedfb69753ffc2512727ec646df2ad", "shasum": "" }, "require": { @@ -2979,7 +2978,7 @@ "type": "tidelift" } ], - "time": "2024-12-07T15:34:16+00:00" + "time": "2024-12-29T14:10:59+00:00" }, { "name": "league/config", @@ -3514,16 +3513,16 @@ }, { "name": "livewire/livewire", - "version": "v3.5.17", + "version": "v3.5.18", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "7bbf80d93db9b866776bf957ca6229364bca8d87" + "reference": "62f0fa6b340a467c25baa590a567d9a134b357da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/7bbf80d93db9b866776bf957ca6229364bca8d87", - "reference": "7bbf80d93db9b866776bf957ca6229364bca8d87", + "url": "https://api.github.com/repos/livewire/livewire/zipball/62f0fa6b340a467c25baa590a567d9a134b357da", + "reference": "62f0fa6b340a467c25baa590a567d9a134b357da", "shasum": "" }, "require": { @@ -3578,7 +3577,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v3.5.17" + "source": "https://github.com/livewire/livewire/tree/v3.5.18" }, "funding": [ { @@ -3586,20 +3585,20 @@ "type": "github" } ], - "time": "2024-12-06T13:41:21+00:00" + "time": "2024-12-23T15:05:02+00:00" }, { "name": "lorisleiva/laravel-actions", - "version": "v2.8.4", + "version": "v2.8.5", "source": { "type": "git", "url": "https://github.com/lorisleiva/laravel-actions.git", - "reference": "5a168bfdd3b75dd6ff259019d4aeef784bbd5403" + "reference": "ae6f5e8dc1f450a0879f73059242e5834b2dbdec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lorisleiva/laravel-actions/zipball/5a168bfdd3b75dd6ff259019d4aeef784bbd5403", - "reference": "5a168bfdd3b75dd6ff259019d4aeef784bbd5403", + "url": "https://api.github.com/repos/lorisleiva/laravel-actions/zipball/ae6f5e8dc1f450a0879f73059242e5834b2dbdec", + "reference": "ae6f5e8dc1f450a0879f73059242e5834b2dbdec", "shasum": "" }, "require": { @@ -3654,7 +3653,7 @@ ], "support": { "issues": "https://github.com/lorisleiva/laravel-actions/issues", - "source": "https://github.com/lorisleiva/laravel-actions/tree/v2.8.4" + "source": "https://github.com/lorisleiva/laravel-actions/tree/v2.8.5" }, "funding": [ { @@ -3662,7 +3661,7 @@ "type": "github" } ], - "time": "2024-09-10T09:57:29+00:00" + "time": "2024-12-19T15:58:09+00:00" }, { "name": "lorisleiva/lody", @@ -4049,16 +4048,16 @@ }, { "name": "nesbot/carbon", - "version": "3.8.2", + "version": "3.8.4", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "e1268cdbc486d97ce23fef2c666dc3c6b6de9947" + "reference": "129700ed449b1f02d70272d2ac802357c8c30c58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e1268cdbc486d97ce23fef2c666dc3c6b6de9947", - "reference": "e1268cdbc486d97ce23fef2c666dc3c6b6de9947", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/129700ed449b1f02d70272d2ac802357c8c30c58", + "reference": "129700ed449b1f02d70272d2ac802357c8c30c58", "shasum": "" }, "require": { @@ -4090,10 +4089,6 @@ ], "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.x-dev", - "dev-2.x": "2.x-dev" - }, "laravel": { "providers": [ "Carbon\\Laravel\\ServiceProvider" @@ -4103,6 +4098,10 @@ "includes": [ "extension.neon" ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev", + "dev-master": "3.x-dev" } }, "autoload": { @@ -4151,7 +4150,7 @@ "type": "tidelift" } ], - "time": "2024-11-07T17:46:48+00:00" + "time": "2024-12-27T09:25:35+00:00" }, { "name": "nette/schema", @@ -4303,16 +4302,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.3.1", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" + "reference": "447a020a1f875a434d62f2a401f53b82a396e494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494", "shasum": "" }, "require": { @@ -4355,9 +4354,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" }, - "time": "2024-10-08T18:51:32+00:00" + "time": "2024-12-30T11:07:19+00:00" }, { "name": "nunomaduro/termwind", @@ -5941,18 +5940,81 @@ ], "time": "2024-02-26T18:08:49+00:00" }, + { + "name": "ryangjchandler/blade-tabler-icons", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/ryangjchandler/blade-tabler-icons.git", + "reference": "cd359f5d3b406a982dae1aaaf121d84067576a2e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ryangjchandler/blade-tabler-icons/zipball/cd359f5d3b406a982dae1aaaf121d84067576a2e", + "reference": "cd359f5d3b406a982dae1aaaf121d84067576a2e", + "shasum": "" + }, + "require": { + "blade-ui-kit/blade-icons": "^1.5", + "illuminate/support": "^10.0 || ^11.0", + "php": "^8.1" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.14", + "orchestra/testbench": "^8.0 || ^9.0", + "phpunit/phpunit": "^9.5.10 || ^10.5" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "RyanChandler\\TablerIcons\\BladeTablerIconsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "RyanChandler\\TablerIcons\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ryan Chandler", + "email": "support@ryangjchandler.co.uk", + "homepage": "https://ryangjchandler.co.uk", + "role": "Developer" + } + ], + "description": "A package to easily make use of Tabler icons in your Laravel Blade views.", + "homepage": "https://github.com/ryangjchandler/blade-tabler-icons", + "keywords": [ + "blade", + "laravel", + "tabler" + ], + "support": { + "issues": "https://github.com/ryangjchandler/blade-tabler-icons/issues", + "source": "https://github.com/ryangjchandler/blade-tabler-icons/tree/v2.3.0" + }, + "abandoned": "secondnetwork/blade-tabler-icons", + "time": "2024-03-12T23:54:24+00:00" + }, { "name": "spatie/color", - "version": "1.6.2", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/spatie/color.git", - "reference": "b4fac074a9e5999dcca12cbfab0f7c73e2684d6d" + "reference": "614f1e0674262c620db908998a11eacd16494835" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/color/zipball/b4fac074a9e5999dcca12cbfab0f7c73e2684d6d", - "reference": "b4fac074a9e5999dcca12cbfab0f7c73e2684d6d", + "url": "https://api.github.com/repos/spatie/color/zipball/614f1e0674262c620db908998a11eacd16494835", + "reference": "614f1e0674262c620db908998a11eacd16494835", "shasum": "" }, "require": { @@ -5990,7 +6052,7 @@ ], "support": { "issues": "https://github.com/spatie/color/issues", - "source": "https://github.com/spatie/color/tree/1.6.2" + "source": "https://github.com/spatie/color/tree/1.7.0" }, "funding": [ { @@ -5998,7 +6060,7 @@ "type": "github" } ], - "time": "2024-12-09T16:20:38+00:00" + "time": "2024-12-30T14:23:15+00:00" }, { "name": "spatie/invade", @@ -6061,16 +6123,16 @@ }, { "name": "spatie/laravel-package-tools", - "version": "1.17.0", + "version": "1.18.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-package-tools.git", - "reference": "9ab30fd24f677e5aa370ea4cf6b41c517d16cf85" + "reference": "8332205b90d17164913244f4a8e13ab7e6761d29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/9ab30fd24f677e5aa370ea4cf6b41c517d16cf85", - "reference": "9ab30fd24f677e5aa370ea4cf6b41c517d16cf85", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/8332205b90d17164913244f4a8e13ab7e6761d29", + "reference": "8332205b90d17164913244f4a8e13ab7e6761d29", "shasum": "" }, "require": { @@ -6109,7 +6171,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-package-tools/issues", - "source": "https://github.com/spatie/laravel-package-tools/tree/1.17.0" + "source": "https://github.com/spatie/laravel-package-tools/tree/1.18.0" }, "funding": [ { @@ -6117,7 +6179,7 @@ "type": "github" } ], - "time": "2024-12-09T16:29:14+00:00" + "time": "2024-12-30T13:13:39+00:00" }, { "name": "spatie/laravel-settings", @@ -6592,12 +6654,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -6815,12 +6877,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -6873,16 +6935,16 @@ }, { "name": "symfony/finder", - "version": "v7.2.0", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "6de263e5868b9a137602dd1e33e4d48bfae99c49" + "reference": "87a71856f2f56e4100373e92529eed3171695cfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/6de263e5868b9a137602dd1e33e4d48bfae99c49", - "reference": "6de263e5868b9a137602dd1e33e4d48bfae99c49", + "url": "https://api.github.com/repos/symfony/finder/zipball/87a71856f2f56e4100373e92529eed3171695cfb", + "reference": "87a71856f2f56e4100373e92529eed3171695cfb", "shasum": "" }, "require": { @@ -6917,7 +6979,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.2.0" + "source": "https://github.com/symfony/finder/tree/v7.2.2" }, "funding": [ { @@ -6933,20 +6995,20 @@ "type": "tidelift" } ], - "time": "2024-10-23T06:56:12+00:00" + "time": "2024-12-30T19:00:17+00:00" }, { "name": "symfony/html-sanitizer", - "version": "v7.2.0", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/html-sanitizer.git", - "reference": "1d23de45af5e8508441ff5f82bb493e83cdcbba4" + "reference": "f6bc679b024e30f27e33815930a5b8b304c79813" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/html-sanitizer/zipball/1d23de45af5e8508441ff5f82bb493e83cdcbba4", - "reference": "1d23de45af5e8508441ff5f82bb493e83cdcbba4", + "url": "https://api.github.com/repos/symfony/html-sanitizer/zipball/f6bc679b024e30f27e33815930a5b8b304c79813", + "reference": "f6bc679b024e30f27e33815930a5b8b304c79813", "shasum": "" }, "require": { @@ -6986,7 +7048,7 @@ "sanitizer" ], "support": { - "source": "https://github.com/symfony/html-sanitizer/tree/v7.2.0" + "source": "https://github.com/symfony/html-sanitizer/tree/v7.2.2" }, "funding": [ { @@ -7002,20 +7064,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2024-12-30T18:35:15+00:00" }, { "name": "symfony/http-foundation", - "version": "v7.2.0", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e88a66c3997859532bc2ddd6dd8f35aba2711744" + "reference": "62d1a43796ca3fea3f83a8470dfe63a4af3bc588" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e88a66c3997859532bc2ddd6dd8f35aba2711744", - "reference": "e88a66c3997859532bc2ddd6dd8f35aba2711744", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/62d1a43796ca3fea3f83a8470dfe63a4af3bc588", + "reference": "62d1a43796ca3fea3f83a8470dfe63a4af3bc588", "shasum": "" }, "require": { @@ -7064,7 +7126,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.2.0" + "source": "https://github.com/symfony/http-foundation/tree/v7.2.2" }, "funding": [ { @@ -7080,20 +7142,20 @@ "type": "tidelift" } ], - "time": "2024-11-13T18:58:46+00:00" + "time": "2024-12-30T19:00:17+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.2.1", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "d8ae58eecae44c8e66833e76cc50a4ad3c002d97" + "reference": "3c432966bd8c7ec7429663105f5a02d7e75b4306" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/d8ae58eecae44c8e66833e76cc50a4ad3c002d97", - "reference": "d8ae58eecae44c8e66833e76cc50a4ad3c002d97", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/3c432966bd8c7ec7429663105f5a02d7e75b4306", + "reference": "3c432966bd8c7ec7429663105f5a02d7e75b4306", "shasum": "" }, "require": { @@ -7178,7 +7240,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.2.1" + "source": "https://github.com/symfony/http-kernel/tree/v7.2.2" }, "funding": [ { @@ -7194,7 +7256,7 @@ "type": "tidelift" } ], - "time": "2024-12-11T12:09:10+00:00" + "time": "2024-12-31T14:59:40+00:00" }, { "name": "symfony/mailer", @@ -8229,12 +8291,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -8377,16 +8439,16 @@ }, { "name": "symfony/translation", - "version": "v7.2.0", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "dc89e16b44048ceecc879054e5b7f38326ab6cc5" + "reference": "e2674a30132b7cc4d74540d6c2573aa363f05923" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/dc89e16b44048ceecc879054e5b7f38326ab6cc5", - "reference": "dc89e16b44048ceecc879054e5b7f38326ab6cc5", + "url": "https://api.github.com/repos/symfony/translation/zipball/e2674a30132b7cc4d74540d6c2573aa363f05923", + "reference": "e2674a30132b7cc4d74540d6c2573aa363f05923", "shasum": "" }, "require": { @@ -8452,7 +8514,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v7.2.0" + "source": "https://github.com/symfony/translation/tree/v7.2.2" }, "funding": [ { @@ -8468,7 +8530,7 @@ "type": "tidelift" } ], - "time": "2024-11-12T20:47:56+00:00" + "time": "2024-12-07T08:18:10+00:00" }, { "name": "symfony/translation-contracts", @@ -8489,12 +8551,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -8707,31 +8769,33 @@ }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "v2.2.7", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb" + "reference": "0d72ac1c00084279c1816675284073c5a337c20d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/83ee6f38df0a63106a9e4536e3060458b74ccedb", - "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/0d72ac1c00084279c1816675284073c5a337c20d", + "reference": "0d72ac1c00084279c1816675284073c5a337c20d", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", - "php": "^5.5 || ^7.0 || ^8.0", - "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" + "php": "^7.4 || ^8.0", + "symfony/css-selector": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10" + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^8.5.21 || ^9.5.10" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -8754,9 +8818,9 @@ "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "support": { "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", - "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.2.7" + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.3.0" }, - "time": "2023-12-08T13:03:43+00:00" + "time": "2024-12-21T16:25:41+00:00" }, { "name": "timokoerber/laravel-one-time-operations", @@ -9227,16 +9291,16 @@ }, { "name": "laravel/pint", - "version": "v1.18.3", + "version": "v1.19.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "cef51821608239040ab841ad6e1c6ae502ae3026" + "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/cef51821608239040ab841ad6e1c6ae502ae3026", - "reference": "cef51821608239040ab841ad6e1c6ae502ae3026", + "url": "https://api.github.com/repos/laravel/pint/zipball/8169513746e1bac70c85d6ea1524d9225d4886f0", + "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0", "shasum": "" }, "require": { @@ -9247,10 +9311,10 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.65.0", - "illuminate/view": "^10.48.24", - "larastan/larastan": "^2.9.11", - "laravel-zero/framework": "^10.4.0", + "friendsofphp/php-cs-fixer": "^3.66.0", + "illuminate/view": "^10.48.25", + "larastan/larastan": "^2.9.12", + "laravel-zero/framework": "^10.48.25", "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^1.17.0", "pestphp/pest": "^2.36.0" @@ -9289,7 +9353,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-11-26T15:34:00+00:00" + "time": "2024-12-30T16:20:10+00:00" }, { "name": "laravel/sail", @@ -10106,16 +10170,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.5.1", + "version": "11.5.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "2b94d4f2450b9869fa64a46fd8a6a41997aef56a" + "reference": "153d0531b9f7e883c5053160cad6dd5ac28140b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2b94d4f2450b9869fa64a46fd8a6a41997aef56a", - "reference": "2b94d4f2450b9869fa64a46fd8a6a41997aef56a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/153d0531b9f7e883c5053160cad6dd5ac28140b3", + "reference": "153d0531b9f7e883c5053160cad6dd5ac28140b3", "shasum": "" }, "require": { @@ -10129,13 +10193,13 @@ "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.2", - "phpunit/php-code-coverage": "^11.0.7", + "phpunit/php-code-coverage": "^11.0.8", "phpunit/php-file-iterator": "^5.1.0", "phpunit/php-invoker": "^5.0.1", "phpunit/php-text-template": "^4.0.1", "phpunit/php-timer": "^7.0.1", "sebastian/cli-parser": "^3.0.2", - "sebastian/code-unit": "^3.0.1", + "sebastian/code-unit": "^3.0.2", "sebastian/comparator": "^6.2.1", "sebastian/diff": "^6.0.2", "sebastian/environment": "^7.2.0", @@ -10187,7 +10251,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.1" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.2" }, "funding": [ { @@ -10203,7 +10267,7 @@ "type": "tidelift" } ], - "time": "2024-12-11T10:52:48+00:00" + "time": "2024-12-21T05:51:08+00:00" }, { "name": "sebastian/cli-parser", diff --git a/config/logging.php b/config/logging.php new file mode 100644 index 000000000..23e17b3ce --- /dev/null +++ b/config/logging.php @@ -0,0 +1,132 @@ + env('LOG_CHANNEL', 'stderr'), + + /* + |-------------------------------------------------------------------------- + | Deprecations Log Channel + |-------------------------------------------------------------------------- + | + | This option controls the log channel that should be used to log warnings + | regarding deprecated PHP and library features. This allows you to get + | your application ready for upcoming major versions of dependencies. + | + */ + + 'deprecations' => [ + 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), + 'trace' => env('LOG_DEPRECATIONS_TRACE', false), + ], + + /* + |-------------------------------------------------------------------------- + | Log Channels + |-------------------------------------------------------------------------- + | + | Here you may configure the log channels for your application. Laravel + | utilizes the Monolog PHP logging library, which includes a variety + | of powerful log handlers and formatters that you're free to use. + | + | Available drivers: "single", "daily", "slack", "syslog", + | "errorlog", "monolog", "custom", "stack" + | + */ + + 'channels' => [ + + 'stack' => [ + 'driver' => 'stack', + 'channels' => explode(',', env('LOG_STACK', 'single')), + 'ignore_exceptions' => false, + ], + + 'single' => [ + 'driver' => 'single', + 'path' => storage_path('logs/laravel.log'), + 'level' => env('LOG_LEVEL', 'debug'), + 'replace_placeholders' => true, + ], + + 'daily' => [ + 'driver' => 'daily', + 'path' => storage_path('logs/laravel.log'), + 'level' => env('LOG_LEVEL', 'debug'), + 'days' => env('LOG_DAILY_DAYS', 14), + 'replace_placeholders' => true, + ], + + 'slack' => [ + 'driver' => 'slack', + 'url' => env('LOG_SLACK_WEBHOOK_URL'), + 'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'), + 'emoji' => env('LOG_SLACK_EMOJI', ':boom:'), + 'level' => env('LOG_LEVEL', 'critical'), + 'replace_placeholders' => true, + ], + + 'papertrail' => [ + 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), + 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), + 'handler_with' => [ + 'host' => env('PAPERTRAIL_URL'), + 'port' => env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), + ], + 'processors' => [PsrLogMessageProcessor::class], + ], + + 'stderr' => [ + 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), + 'handler' => StreamHandler::class, + 'formatter' => env('LOG_STDERR_FORMATTER'), + 'with' => [ + 'stream' => 'php://stderr', + ], + 'processors' => [PsrLogMessageProcessor::class], + ], + + 'syslog' => [ + 'driver' => 'syslog', + 'level' => env('LOG_LEVEL', 'debug'), + 'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER), + 'replace_placeholders' => true, + ], + + 'errorlog' => [ + 'driver' => 'errorlog', + 'level' => env('LOG_LEVEL', 'debug'), + 'replace_placeholders' => true, + ], + + 'null' => [ + 'driver' => 'monolog', + 'handler' => NullHandler::class, + ], + + 'emergency' => [ + 'path' => storage_path('logs/laravel.log'), + ], + + ], + +]; diff --git a/config/speedtest.php b/config/speedtest.php index e06700733..2d14bf2c2 100644 --- a/config/speedtest.php +++ b/config/speedtest.php @@ -4,9 +4,9 @@ return [ - 'build_date' => Carbon::parse('2024-12-18'), + 'build_date' => Carbon::parse('2025-01-05'), - 'build_version' => 'v1.0.2', + 'build_version' => 'v1.0.3', /** * General settings. @@ -35,9 +35,22 @@ 'blocked_servers' => env('SPEEDTEST_BLOCKED_SERVERS'), + 'interface' => env('SPEEDTEST_INTERFACE'), + /** * IP filtering settings. */ 'skip_ips' => env('SPEEDTEST_SKIP_IPS', ''), + /** + * Threshold settings. + */ + + 'threshold_enabled' => env('THRESHOLD_ENABLED', false), + + 'threshold_download' => env('THRESHOLD_DOWNLOAD', 0), + + 'threshold_upload' => env('THRESHOLD_UPLOAD', 0), + + 'threshold_ping' => env('THRESHOLD_PING', 0) , ]; diff --git a/database/settings/2022_10_24_153411_create_thresholds_settings.php b/database/settings/2022_10_24_153411_create_thresholds_settings.php index 9dbc9496d..f41e37c41 100644 --- a/database/settings/2022_10_24_153411_create_thresholds_settings.php +++ b/database/settings/2022_10_24_153411_create_thresholds_settings.php @@ -6,9 +6,9 @@ class CreateThresholdsSettings extends SettingsMigration { public function up(): void { - $this->migrator->add('threshold.absolute_enabled', false); - $this->migrator->add('threshold.absolute_download', 0); - $this->migrator->add('threshold.absolute_upload', 0); - $this->migrator->add('threshold.absolute_ping', 0); + $this->migrator->add('threshold.absolute_enabled', config('speedtest.threshold_enabled')); + $this->migrator->add('threshold.absolute_download', config('speedtest.threshold_download')); + $this->migrator->add('threshold.absolute_upload', config('speedtest.threshold_upload')); + $this->migrator->add('threshold.absolute_ping', config('speedtest.threshold_ping')); } } diff --git a/lang/en/passwords.php b/lang/en/passwords.php index 2345a56b5..8df100b32 100644 --- a/lang/en/passwords.php +++ b/lang/en/passwords.php @@ -15,6 +15,7 @@ 'reset' => 'Your password has been reset!', 'sent' => 'We have emailed your password reset link!', + 'password' => 'The password and confirmation must match and contain at least six characters.', 'throttled' => 'Please wait before retrying.', 'token' => 'This password reset token is invalid.', 'user' => "We can't find a user with that email address.", diff --git a/lang/en/validation.php b/lang/en/validation.php index 4f8f72621..c05ff40f1 100644 --- a/lang/en/validation.php +++ b/lang/en/validation.php @@ -180,6 +180,51 @@ | */ - 'attributes' => [], - + 'attributes' => [ + 'address' => 'address', + 'age' => 'age', + 'body' => 'content', + 'cell' => 'cell', + 'city' => 'city', + 'country' => 'country', + 'date' => 'date', + 'day' => 'day', + 'excerpt' => 'summary', + 'first_name' => 'first name', + 'gender' => 'gender', + 'marital_status' => 'marital status', + 'profession' => 'profession', + 'nationality' => 'nationality', + 'hour' => 'hour', + 'last_name' => 'last name', + 'message' => 'message', + 'minute' => 'minute', + 'mobile' => 'mobile', + 'month' => 'month', + 'name' => 'name', + 'zipcode' => 'zipcode', + 'company_name' => 'company name', + 'neighborhood' => 'neighborhood', + 'number' => 'number', + 'password' => 'password', + 'phone' => 'phone', + 'second' => 'second', + 'sex' => 'sex', + 'state' => 'state', + 'street' => 'street', + 'subject' => 'subject', + 'text' => 'text', + 'time' => 'time', + 'title' => 'title', + 'username' => 'username', + 'year' => 'year', + 'description' => 'description', + 'password_confirmation' => 'password confirmation', + 'current_password' => 'current password', + 'complement' => 'complement', + 'modality' => 'modality', + 'category' => 'category', + 'blood_type' => 'blood type', + 'birth_date' => 'birth date', + ], ]; diff --git a/lang/pt_BR/passwords.php b/lang/pt_BR/passwords.php index 9ea94b7e2..b49c439f8 100644 --- a/lang/pt_BR/passwords.php +++ b/lang/pt_BR/passwords.php @@ -13,9 +13,9 @@ | */ - 'password' => 'A senha e a confirmação devem combinar e possuir pelo menos seis caracteres.', 'reset' => 'Sua senha foi redefinida!', 'sent' => 'Enviamos seu link de redefinição de senha por e-mail!', + 'password' => 'A senha e a confirmação devem combinar e possuir pelo menos seis caracteres.', 'throttled' => 'Aguarde antes de tentar novamente.', 'token' => 'Este token de redefinição de senha é inválido.', 'user' => 'Não encontramos um usuário com esse endereço de e-mail.', diff --git a/lang/pt_BR/validation.php b/lang/pt_BR/validation.php index b6c0c47a4..e11c1bee1 100644 --- a/lang/pt_BR/validation.php +++ b/lang/pt_BR/validation.php @@ -22,6 +22,7 @@ 'alpha_dash' => 'O campo :attribute só pode conter letras, números e traços.', 'alpha_num' => 'O campo :attribute só pode conter letras e números.', 'array' => 'O campo :attribute deve ser uma matriz.', + 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', // TODO 'before' => 'O campo :attribute deve ser uma data anterior :date.', 'before_or_equal' => 'O campo :attribute deve ser uma data anterior ou igual a :date.', 'between' => [ @@ -31,11 +32,13 @@ 'array' => 'O campo :attribute deve ter entre :min e :max itens.', ], 'boolean' => 'O campo :attribute deve ser verdadeiro ou falso.', + 'can' => 'The :attribute field contains an unauthorized value.', // TODO 'confirmed' => 'O campo :attribute de confirmação não confere.', 'current_password' => 'A senha está incorreta.', 'date' => 'O campo :attribute não é uma data válida.', 'date_equals' => 'O campo :attribute deve ser uma data igual a :date.', 'date_format' => 'O campo :attribute não corresponde ao formato :format.', + 'decimal' => 'The :attribute field must have :decimal decimal places.', // TODO 'declined' => 'O :attribute deve ser recusado.', 'declined_if' => 'O :attribute deve ser recusado quando :other for :value.', 'different' => 'Os campos :attribute e :other devem ser diferentes.', @@ -71,6 +74,7 @@ 'ipv4' => 'O campo :attribute deve ser um endereço IPv4 válido.', 'ipv6' => 'O campo :attribute deve ser um endereço IPv6 válido.', 'json' => 'O campo :attribute deve ser uma string JSON válida.', + 'lowercase' => 'The :attribute field must be lowercase.', // TODO 'lt' => [ 'numeric' => 'O campo :attribute deve ser menor que :value.', 'file' => 'O campo :attribute deve ser menor que :value kilobytes.', @@ -83,6 +87,7 @@ 'string' => 'O campo :attribute deve ser menor ou igual a :value caracteres.', 'array' => 'O campo :attribute não deve conter mais que :value itens.', ], + 'mac_address' => 'The :attribute field must be a valid MAC address.', // TODO 'max' => [ 'numeric' => 'O campo :attribute não pode ser superior a :max.', 'file' => 'O campo :attribute não pode ser superior a :max kilobytes.', @@ -98,10 +103,14 @@ 'string' => 'O campo :attribute deve ter pelo menos :min caracteres.', 'array' => 'O campo :attribute deve ter pelo menos :min itens.', ], - 'missing_with' => 'O campo :attribute não deve estar presente quando houver :values.', 'min_digits' => 'O campo :attribute deve ter pelo menos :min dígitos', - 'not_in' => 'O campo :attribute selecionado é inválido.', + 'missing' => 'The :attribute field must be missing.', // TODO + 'missing_if' => 'The :attribute field must be missing when :other is :value.', // TODO + 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', // TODO + 'missing_with' => 'O campo :attribute não deve estar presente quando houver :values.', + 'missing_with_all' => 'The :attribute field must be missing when :values are present.', // TODO 'multiple_of' => 'O campo :attribute deve ser um múltiplo de :value.', + 'not_in' => 'O campo :attribute selecionado é inválido.', 'not_regex' => 'O campo :attribute possui um formato inválido.', 'numeric' => 'O campo :attribute deve ser um número.', 'password' => [ @@ -112,19 +121,20 @@ 'uncompromised' => 'A senha que você inseriu em :attribute está em um vazamento de dados. Por favor escolha uma senha diferente.', ], 'present' => 'O campo :attribute deve estar presente.', + 'prohibited' => 'O campo :attribute é proibido.', + 'prohibited_if' => 'O campo :attribute é proibido quando :other for :value.', + 'prohibited_unless' => 'O campo :attribute é proibido exceto quando :other for :values.', + 'prohibits' => 'O campo :attribute proíbe :other de estar presente.', 'regex' => 'O campo :attribute tem um formato inválido.', 'required' => 'O campo :attribute é obrigatório.', 'required_array_keys' => 'O campo :attribute deve conter entradas para: :values.', 'required_if' => 'O campo :attribute é obrigatório quando :other for :value.', + 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', // TODO 'required_unless' => 'O campo :attribute é obrigatório exceto quando :other for :values.', 'required_with' => 'O campo :attribute é obrigatório quando :values está presente.', 'required_with_all' => 'O campo :attribute é obrigatório quando :values está presente.', 'required_without' => 'O campo :attribute é obrigatório quando :values não está presente.', 'required_without_all' => 'O campo :attribute é obrigatório quando nenhum dos :values estão presentes.', - 'prohibited' => 'O campo :attribute é proibido.', - 'prohibited_if' => 'O campo :attribute é proibido quando :other for :value.', - 'prohibited_unless' => 'O campo :attribute é proibido exceto quando :other for :values.', - 'prohibits' => 'O campo :attribute proíbe :other de estar presente.', 'same' => 'Os campos :attribute e :other devem corresponder.', 'size' => [ 'numeric' => 'O campo :attribute deve ser :size.', @@ -137,7 +147,9 @@ 'timezone' => 'O campo :attribute deve ser uma zona válida.', 'unique' => 'O campo :attribute já está sendo utilizado.', 'uploaded' => 'Ocorreu uma falha no upload do campo :attribute.', + 'uppercase' => 'The :attribute field must be uppercase.', // TODO 'url' => 'O campo :attribute tem um formato inválido.', + 'ulid' => 'The :attribute field must be a valid ULID.', // TODO 'uuid' => 'O campo :attribute deve ser um UUID válido.', /* diff --git a/lang/tr_TR/auth.php b/lang/tr_TR/auth.php new file mode 100644 index 000000000..273c94fee --- /dev/null +++ b/lang/tr_TR/auth.php @@ -0,0 +1,20 @@ + 'Bu bilgiler kayıtlarımızla uyuşmuyor.', + 'password' => 'Sağlanan şifre yanlış.', + 'throttle' => 'Çok fazla giriş denemesi. Lütfen :seconds saniye içinde tekrar deneyin.', + +]; diff --git a/lang/tr_TR/pagination.php b/lang/tr_TR/pagination.php new file mode 100644 index 000000000..8c760579e --- /dev/null +++ b/lang/tr_TR/pagination.php @@ -0,0 +1,19 @@ + '« Önceki', + 'next' => 'Sonraki »', + +]; diff --git a/lang/tr_TR/passwords.php b/lang/tr_TR/passwords.php new file mode 100644 index 000000000..a6563d39c --- /dev/null +++ b/lang/tr_TR/passwords.php @@ -0,0 +1,23 @@ + 'Parolanız sıfırlandı!', + 'sent' => 'Parola sıfırlama bağlantınızı e-postayla gönderdik!', + 'password' => 'Şifre ve onay aynı olmalı ve en az altı karakter uzunluğunda olmalıdır.', + 'throttled' => 'Tekrar denemeden önce lütfen bekleyin.', + 'token' => 'Bu parola sıfırlama anahtarı geçersiz.', + 'user' => 'Bu e-posta adresine sahip bir kullanıcı bulamadık.', + +]; diff --git a/lang/tr_TR/validation.php b/lang/tr_TR/validation.php new file mode 100644 index 000000000..92ff01c14 --- /dev/null +++ b/lang/tr_TR/validation.php @@ -0,0 +1,230 @@ + ':attribute alanı kabul edilmelidir.', + 'accepted_if' => ':attribute alanı, :other değeri :value olduğunda kabul edilmelidir.', + 'active_url' => ':attribute alanı geçerli bir URL olmalıdır.', + 'after' => ':attribute alanı :date değerinden sonraki bir tarih olmalıdır.', + 'after_or_equal' => ':attribute alanı :date tarihinden sonra veya ona eşit bir tarih olmalıdır.', + 'alpha' => ':attribute alanı yalnızca harf içermelidir.', + 'alpha_dash' => ':attribute alanı yalnızca harf, rakam, tire(-) ve alt çizgi(_) içermelidir.', + 'alpha_num' => ':attribute alanı yalnızca harf ve rakamlardan oluşmalıdır.', + 'array' => ':attribute alanı bir dizi olmalıdır.', + 'ascii' => ':attribute alanı yalnızca tek baytlık alfanümerik karakterler ve semboller içermelidir.', + 'before' => ':attribute alanı :date değerinden önceki bir tarih olmalıdır.', + 'before_or_equal' => ':attribute alanı :date tarihinden önce veya ona eşit bir tarih olmalıdır.', + 'between' => [ + 'array' => ':attribute :min ile :max öğe arasında olmalıdır.', + 'file' => ':attribute :min ile :max kilobayt arasında olmalıdır.', + 'numeric' => ':attribute :min ile :max arasında olmalıdır.', + 'string' => ':attribute :min ile :max karakter arasında olmalıdır.', + ], + 'boolean' => ':attribute alanı doğru veya yanlış olmalıdır.', + 'can' => ':attribute alanı yetkisiz bir değer içeriyor.', + 'confirmed' => ':attribute doğrulaması eşleşmiyor.', + 'current_password' => 'Şifre yanlış.', + 'date' => ':attribute geçerli bir tarih olmalıdır.', + 'date_equals' => ':attribute :date tarihine eşit bir tarih olmalıdır.', + 'date_format' => ':attribute :format formatıyla eşleşmelidir.', + 'decimal' => ':attribute :decimal ondalık basamak içermelidir.', + 'declined' => ':attribute reddedilmelidir.', + 'declined_if' => ':attribute, :other :value olduğunda reddedilmelidir.', + 'different' => ':attribute ve :other farklı olmalıdır.', + 'digits' => ':attribute :digits basamaklı olmalıdır.', + 'digits_between' => ':attribute :min ile :max basamak arasında olmalıdır.', + 'dimensions' => ':attribute geçersiz resim boyutlarına sahiptir.', + 'distinct' => ':attribute alanında yinelenen bir değer var.', + 'doesnt_end_with' => ':attribute şu değerlerden biriyle bitmemelidir: :values.', + 'doesnt_start_with' => ':attribute şu değerlerden biriyle başlamamalıdır: :values.', + 'email' => ':attribute geçerli bir e-posta adresi olmalıdır.', + 'ends_with' => ':attribute şu değerlerden biriyle bitmelidir: :values.', + 'enum' => 'Seçilen :attribute geçersiz.', + 'exists' => 'Seçilen :attribute geçersiz.', + 'file' => ':attribute bir dosya olmalıdır.', + 'filled' => ':attribute bir değer içermelidir.', + 'gt' => [ + 'array' => ':attribute :value öğeden fazla olmalıdır.', + 'file' => ':attribute :value kilobayttan büyük olmalıdır.', + 'numeric' => ':attribute :value değerinden büyük olmalıdır.', + 'string' => ':attribute :value karakterden uzun olmalıdır.', + ], + 'gte' => [ + 'array' => ':attribute :value veya daha fazla öğe içermelidir.', + 'file' => ':attribute :value kilobayt veya daha büyük olmalıdır.', + 'numeric' => ':attribute :value değerine eşit veya daha büyük olmalıdır.', + 'string' => ':attribute :value karakter veya daha fazla olmalıdır.', + ], + 'image' => ':attribute bir resim olmalıdır.', + 'in' => 'Seçilen :attribute geçersiz.', + 'in_array' => ':attribute, :other içinde mevcut olmalıdır.', + 'integer' => ':attribute bir tam sayı olmalıdır.', + 'ip' => ':attribute geçerli bir IP adresi olmalıdır.', + 'ipv4' => ':attribute geçerli bir IPv4 adresi olmalıdır.', + 'ipv6' => ':attribute geçerli bir IPv6 adresi olmalıdır.', + 'json' => ':attribute geçerli bir JSON metni olmalıdır.', + 'lowercase' => ':attribute küçük harflerden oluşmalıdır.', + 'lt' => [ + 'array' => ':attribute :value öğeden az olmalıdır.', + 'file' => ':attribute :value kilobayttan küçük olmalıdır.', + 'numeric' => ':attribute :value değerinden küçük olmalıdır.', + 'string' => ':attribute :value karakterden kısa olmalıdır.', + ], + 'lte' => [ + 'array' => ':attribute :value öğeden fazla olmamalıdır.', + 'file' => ':attribute :value kilobayt veya daha az olmalıdır.', + 'numeric' => ':attribute :value değerine eşit veya daha küçük olmalıdır.', + 'string' => ':attribute :value karakter veya daha az olmalıdır.', + ], + 'mac_address' => ':attribute geçerli bir MAC adresi olmalıdır.', + 'max' => [ + 'array' => ':attribute :max öğeden fazla olmamalıdır.', + 'file' => ':attribute :max kilobayttan büyük olmamalıdır.', + 'numeric' => ':attribute :max değerinden büyük olmamalıdır.', + 'string' => ':attribute :max karakterden uzun olmamalıdır.', + ], + 'max_digits' => ':attribute :max basamaktan fazla olmamalıdır.', + 'mimes' => ':attribute şu türde bir dosya olmalıdır: :values.', + 'mimetypes' => ':attribute şu türde bir dosya olmalıdır: :values.', + 'min' => [ + 'array' => ':attribute en az :min öğe içermelidir.', + 'file' => ':attribute en az :min kilobayt olmalıdır.', + 'numeric' => ':attribute en az :min olmalıdır.', + 'string' => ':attribute en az :min karakter olmalıdır.', + ], + 'min_digits' => ':attribute en az :min basamak içermelidir.', + 'missing' => ':attribute eksik olmalıdır.', + 'missing_if' => ':attribute, :other :value olduğunda eksik olmalıdır.', + 'missing_unless' => ':attribute, :other :value değilse eksik olmalıdır.', + 'missing_with' => ':attribute, :values mevcut olduğunda eksik olmalıdır.', + 'missing_with_all' => ':attribute, :values mevcut olduğunda eksik olmalıdır.', + 'multiple_of' => ':attribute :value katı olmalıdır.', + 'not_in' => 'Seçilen :attribute geçersiz.', + 'not_regex' => ':attribute formatı geçersiz.', + 'numeric' => ':attribute bir sayı olmalıdır.', + 'password' => [ + 'letters' => ':attribute en az bir harf içermelidir.', + 'mixed' => ':attribute en az bir büyük harf ve bir küçük harf içermelidir.', + 'numbers' => ':attribute en az bir rakam içermelidir.', + 'symbols' => ':attribute en az bir sembol içermelidir.', + 'uncompromised' => 'Verilen :attribute bir veri ihlalinde tespit edilmiştir. Lütfen farklı bir :attribute seçin.', + ], + 'present' => ':attribute mevcut olmalıdır.', + 'prohibited' => ':attribute yasaktır.', + 'prohibited_if' => ':attribute, :other :value olduğunda yasaktır.', + 'prohibited_unless' => ':attribute, :other :values içinde olmadıkça yasaktır.', + 'prohibits' => ':attribute, :other alanının mevcut olmasını yasaklar.', + 'regex' => ':attribute formatı geçersiz.', + 'required' => ':attribute alanı gereklidir.', + 'required_array_keys' => ':attribute şu anahtarları içermelidir: :values.', + 'required_if' => ':attribute, :other :value olduğunda gereklidir.', + 'required_if_accepted' => ':attribute, :other kabul edildiğinde gereklidir.', + 'required_unless' => ':attribute, :other :values içinde olmadıkça gereklidir.', + 'required_with' => ':attribute, :values mevcut olduğunda gereklidir.', + 'required_with_all' => ':attribute, :values mevcut olduğunda gereklidir.', + 'required_without' => ':attribute, :values mevcut değilse gereklidir.', + 'required_without_all' => ':attribute, :values hiçbirisi mevcut değilse gereklidir.', + 'same' => ':attribute, :other ile eşleşmelidir.', + 'size' => [ + 'array' => ':attribute :size öğe içermelidir.', + 'file' => ':attribute :size kilobayt olmalıdır.', + 'numeric' => ':attribute :size olmalıdır.', + 'string' => ':attribute :size karakter olmalıdır.', + ], + 'starts_with' => ':attribute şu değerlerden biriyle başlamalıdır: :values.', + 'string' => ':attribute bir metin olmalıdır.', + 'timezone' => ':attribute geçerli bir zaman dilimi olmalıdır.', + 'unique' => ':attribute zaten alınmış.', + 'uploaded' => ':attribute yüklenemedi.', + 'uppercase' => ':attribute büyük harflerden oluşmalıdır.', + 'url' => ':attribute geçerli bir URL olmalıdır.', + 'ulid' => ':attribute geçerli bir ULID olmalıdır.', + 'uuid' => ':attribute geçerli bir UUID olmalıdır.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap our attribute placeholder + | with something more reader friendly such as "E-Mail Address" instead + | of "email". This simply helps us make our message more expressive. + | + */ + + 'attributes' => [ + 'address' => 'adres', + 'age' => 'yaş', + 'body' => 'içerik', + 'cell' => 'hücre', + 'city' => 'şehir', + 'country' => 'ülke', + 'date' => 'tarih', + 'day' => 'gün', + 'excerpt' => 'özet', + 'first_name' => 'ad', + 'gender' => 'cinsiyet', + 'marital_status' => 'medeni hal', + 'profession' => 'meslek', + 'nationality' => 'uyruk', + 'hour' => 'saat', + 'last_name' => 'soyad', + 'message' => 'mesaj', + 'minute' => 'dakika', + 'mobile' => 'cep telefonu', + 'month' => 'ay', + 'name' => 'isim', + 'zipcode' => 'posta kodu', + 'company_name' => 'şirket adı', + 'neighborhood' => 'mahalle', + 'number' => 'numara', + 'password' => 'şifre', + 'phone' => 'telefon', + 'second' => 'saniye', + 'sex' => 'cinsiyet', + 'state' => 'eyalet', + 'street' => 'sokak', + 'subject' => 'konu', + 'text' => 'metin', + 'time' => 'zaman', + 'title' => 'başlık', + 'username' => 'kullanıcı adı', + 'year' => 'yıl', + 'description' => 'açıklama', + 'password_confirmation' => 'şifre doğrulama', + 'current_password' => 'mevcut şifre', + 'complement' => 'ek bilgi', + 'modality' => 'mod', + 'category' => 'kategori', + 'blood_type' => 'kan grubu', + 'birth_date' => 'doğum tarihi', + ], +]; diff --git a/resources/views/filament/pages/api-tokens.blade.php b/resources/views/filament/pages/api-tokens.blade.php new file mode 100644 index 000000000..ff1070b8a --- /dev/null +++ b/resources/views/filament/pages/api-tokens.blade.php @@ -0,0 +1,11 @@ + + @filled($token) +
+ {{ $this->tokenInfolist }} +
+ @endfilled + +
+ {{ $this->table }} +
+