From a1e61fd0cd0e73dfe293fa3202bb01fa8c88fdd1 Mon Sep 17 00:00:00 2001 From: levifvy Date: Sat, 22 Jul 2023 20:24:45 +0200 Subject: [PATCH 01/33] Adding lang package --- composer.json | 3 +- composer.lock | 68 +++++++++++- config/app.php | 2 +- resources/lang/ca/app.php | 4 + resources/lang/en/app.php | 4 + resources/lang/en/auth.php | 20 ++++ resources/lang/en/pagination.php | 19 ++++ resources/lang/en/passwords.php | 22 ++++ resources/lang/en/validation.php | 185 +++++++++++++++++++++++++++++++ resources/lang/es.json | 33 ++++++ resources/lang/es/app.php | 4 + resources/lang/es/auth.php | 19 ++++ resources/lang/es/pagination.php | 19 ++++ resources/lang/es/passwords.php | 22 ++++ resources/lang/es/validation.php | 151 +++++++++++++++++++++++++ 15 files changed, 572 insertions(+), 3 deletions(-) create mode 100644 resources/lang/ca/app.php create mode 100644 resources/lang/en/app.php create mode 100644 resources/lang/en/auth.php create mode 100644 resources/lang/en/pagination.php create mode 100644 resources/lang/en/passwords.php create mode 100644 resources/lang/en/validation.php create mode 100644 resources/lang/es.json create mode 100644 resources/lang/es/app.php create mode 100644 resources/lang/es/auth.php create mode 100644 resources/lang/es/pagination.php create mode 100644 resources/lang/es/passwords.php create mode 100644 resources/lang/es/validation.php diff --git a/composer.json b/composer.json index f68f6a6..8563c2d 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,8 @@ "laravel/framework": "^10.0", "laravel/passport": "^11.8", "laravel/sanctum": "^3.2", - "laravel/tinker": "^2.8" + "laravel/tinker": "^2.8", + "laraveles/spanish": "^1.5" }, "require-dev": { "fakerphp/faker": "^1.9.1", diff --git a/composer.lock b/composer.lock index 96208ca..441beb9 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": "cf1e0b7847054f55d58419e43efc3be4", + "content-hash": "c4029cb829b5dfe9c6e99034cd0855c3", "packages": [ { "name": "brick/math", @@ -1731,6 +1731,72 @@ }, "time": "2023-02-15T16:40:09+00:00" }, + { + "name": "laraveles/spanish", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/Laraveles/spanish.git", + "reference": "2224e3db7ec399952523b0769a7677de0b6afd8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Laraveles/spanish/zipball/2224e3db7ec399952523b0769a7677de0b6afd8b", + "reference": "2224e3db7ec399952523b0769a7677de0b6afd8b", + "shasum": "" + }, + "require": { + "illuminate/console": ">=5.4.0", + "illuminate/support": ">=5.4.0", + "php": ">=5.6" + }, + "require-dev": { + "orchestra/testbench": "^3.4|^4.0", + "phpunit/phpunit": "^5.6|^6.3|^7.0|^8.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laraveles\\Spanish\\SpanishServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laraveles\\Spanish\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Israel Ortuño", + "email": "ai.ortuno@gmail.com" + }, + { + "name": "Cesar Garcia", + "email": "cesargb@gmail.com", + "homepage": "https://github.com/cesargb", + "role": "Developer" + } + ], + "description": "Conjunto de traducciones en español para Laravel", + "homepage": "https://github.com/Laraveles/spanish", + "keywords": [ + "laravel", + "laraveles", + "spanish", + "traduccion" + ], + "support": { + "issues": "https://github.com/Laraveles/spanish/issues", + "source": "https://github.com/Laraveles/spanish/tree/master" + }, + "time": "2020-06-30T06:01:43+00:00" + }, { "name": "lcobucci/clock", "version": "2.3.0", diff --git a/config/app.php b/config/app.php index 32d28ce..6015f6a 100644 --- a/config/app.php +++ b/config/app.php @@ -82,7 +82,7 @@ | */ - 'locale' => 'en', + 'locale' => 'es', /* |-------------------------------------------------------------------------- diff --git a/resources/lang/ca/app.php b/resources/lang/ca/app.php new file mode 100644 index 0000000..89d8dd2 --- /dev/null +++ b/resources/lang/ca/app.php @@ -0,0 +1,4 @@ + 'Aplicació multi-idioma', +]; \ No newline at end of file diff --git a/resources/lang/en/app.php b/resources/lang/en/app.php new file mode 100644 index 0000000..aa2f140 --- /dev/null +++ b/resources/lang/en/app.php @@ -0,0 +1,4 @@ + 'Multi-Language Application', +]; \ No newline at end of file diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php new file mode 100644 index 0000000..6598e2c --- /dev/null +++ b/resources/lang/en/auth.php @@ -0,0 +1,20 @@ + 'These credentials do not match our records.', + 'password' => 'The provided password is incorrect.', + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + +]; diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php new file mode 100644 index 0000000..d481411 --- /dev/null +++ b/resources/lang/en/pagination.php @@ -0,0 +1,19 @@ + '« Previous', + 'next' => 'Next »', + +]; diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php new file mode 100644 index 0000000..f1223bd --- /dev/null +++ b/resources/lang/en/passwords.php @@ -0,0 +1,22 @@ + 'Your password has been reset.', + 'sent' => 'We have emailed your password reset link.', + '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/resources/lang/en/validation.php b/resources/lang/en/validation.php new file mode 100644 index 0000000..4f8f726 --- /dev/null +++ b/resources/lang/en/validation.php @@ -0,0 +1,185 @@ + 'The :attribute field must be accepted.', + 'accepted_if' => 'The :attribute field must be accepted when :other is :value.', + 'active_url' => 'The :attribute field must be a valid URL.', + 'after' => 'The :attribute field must be a date after :date.', + 'after_or_equal' => 'The :attribute field must be a date after or equal to :date.', + 'alpha' => 'The :attribute field must only contain letters.', + 'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.', + 'alpha_num' => 'The :attribute field must only contain letters and numbers.', + 'array' => 'The :attribute field must be an array.', + 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', + 'before' => 'The :attribute field must be a date before :date.', + 'before_or_equal' => 'The :attribute field must be a date before or equal to :date.', + 'between' => [ + 'array' => 'The :attribute field must have between :min and :max items.', + 'file' => 'The :attribute field must be between :min and :max kilobytes.', + 'numeric' => 'The :attribute field must be between :min and :max.', + 'string' => 'The :attribute field must be between :min and :max characters.', + ], + 'boolean' => 'The :attribute field must be true or false.', + 'can' => 'The :attribute field contains an unauthorized value.', + 'confirmed' => 'The :attribute field confirmation does not match.', + 'current_password' => 'The password is incorrect.', + 'date' => 'The :attribute field must be a valid date.', + 'date_equals' => 'The :attribute field must be a date equal to :date.', + 'date_format' => 'The :attribute field must match the format :format.', + 'decimal' => 'The :attribute field must have :decimal decimal places.', + 'declined' => 'The :attribute field must be declined.', + 'declined_if' => 'The :attribute field must be declined when :other is :value.', + 'different' => 'The :attribute field and :other must be different.', + 'digits' => 'The :attribute field must be :digits digits.', + 'digits_between' => 'The :attribute field must be between :min and :max digits.', + 'dimensions' => 'The :attribute field has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.', + 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.', + 'email' => 'The :attribute field must be a valid email address.', + 'ends_with' => 'The :attribute field must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', + 'exists' => 'The selected :attribute is invalid.', + 'file' => 'The :attribute field must be a file.', + 'filled' => 'The :attribute field must have a value.', + 'gt' => [ + 'array' => 'The :attribute field must have more than :value items.', + 'file' => 'The :attribute field must be greater than :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than :value.', + 'string' => 'The :attribute field must be greater than :value characters.', + ], + 'gte' => [ + 'array' => 'The :attribute field must have :value items or more.', + 'file' => 'The :attribute field must be greater than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than or equal to :value.', + 'string' => 'The :attribute field must be greater than or equal to :value characters.', + ], + 'image' => 'The :attribute field must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field must exist in :other.', + 'integer' => 'The :attribute field must be an integer.', + 'ip' => 'The :attribute field must be a valid IP address.', + 'ipv4' => 'The :attribute field must be a valid IPv4 address.', + 'ipv6' => 'The :attribute field must be a valid IPv6 address.', + 'json' => 'The :attribute field must be a valid JSON string.', + 'lowercase' => 'The :attribute field must be lowercase.', + 'lt' => [ + 'array' => 'The :attribute field must have less than :value items.', + 'file' => 'The :attribute field must be less than :value kilobytes.', + 'numeric' => 'The :attribute field must be less than :value.', + 'string' => 'The :attribute field must be less than :value characters.', + ], + 'lte' => [ + 'array' => 'The :attribute field must not have more than :value items.', + 'file' => 'The :attribute field must be less than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be less than or equal to :value.', + 'string' => 'The :attribute field must be less than or equal to :value characters.', + ], + 'mac_address' => 'The :attribute field must be a valid MAC address.', + 'max' => [ + 'array' => 'The :attribute field must not have more than :max items.', + 'file' => 'The :attribute field must not be greater than :max kilobytes.', + 'numeric' => 'The :attribute field must not be greater than :max.', + 'string' => 'The :attribute field must not be greater than :max characters.', + ], + 'max_digits' => 'The :attribute field must not have more than :max digits.', + 'mimes' => 'The :attribute field must be a file of type: :values.', + 'mimetypes' => 'The :attribute field must be a file of type: :values.', + 'min' => [ + 'array' => 'The :attribute field must have at least :min items.', + 'file' => 'The :attribute field must be at least :min kilobytes.', + 'numeric' => 'The :attribute field must be at least :min.', + 'string' => 'The :attribute field must be at least :min characters.', + ], + 'min_digits' => 'The :attribute field must have at least :min digits.', + 'missing' => 'The :attribute field must be missing.', + 'missing_if' => 'The :attribute field must be missing when :other is :value.', + 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', + 'missing_with' => 'The :attribute field must be missing when :values is present.', + 'missing_with_all' => 'The :attribute field must be missing when :values are present.', + 'multiple_of' => 'The :attribute field must be a multiple of :value.', + 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute field format is invalid.', + 'numeric' => 'The :attribute field must be a number.', + 'password' => [ + 'letters' => 'The :attribute field must contain at least one letter.', + 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.', + 'numbers' => 'The :attribute field must contain at least one number.', + 'symbols' => 'The :attribute field must contain at least one symbol.', + 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', + ], + 'present' => 'The :attribute field must be present.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'prohibits' => 'The :attribute field prohibits :other from being present.', + 'regex' => 'The :attribute field format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', + 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values are present.', + 'required_without' => 'The :attribute field is required when :values is not present.', + 'required_without_all' => 'The :attribute field is required when none of :values are present.', + 'same' => 'The :attribute field must match :other.', + 'size' => [ + 'array' => 'The :attribute field must contain :size items.', + 'file' => 'The :attribute field must be :size kilobytes.', + 'numeric' => 'The :attribute field must be :size.', + 'string' => 'The :attribute field must be :size characters.', + ], + 'starts_with' => 'The :attribute field must start with one of the following: :values.', + 'string' => 'The :attribute field must be a string.', + 'timezone' => 'The :attribute field must be a valid timezone.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'uppercase' => 'The :attribute field must be uppercase.', + 'url' => 'The :attribute field must be a valid URL.', + 'ulid' => 'The :attribute field must be a valid ULID.', + 'uuid' => 'The :attribute field must be a valid UUID.', + + /* + |-------------------------------------------------------------------------- + | 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' => [], + +]; diff --git a/resources/lang/es.json b/resources/lang/es.json new file mode 100644 index 0000000..2e8a80e --- /dev/null +++ b/resources/lang/es.json @@ -0,0 +1,33 @@ +{ + "E-Mail Address": "Correo electrónico", + "Password": "Contraseña", + "Remember Me": "Recuérdame", + "Login": "Acceder", + "Forgot Your Password?": "¿Olvidaste tu contraseña?", + "Register": "Registro", + "Name": "Nombre", + "Confirm Password": "Confirmar contraseña", + "Reset Password": "Restablecer contraseña", + "Reset Password Notification": "Aviso para restablecer contraseña", + "You are receiving this email because we received a password reset request for your account.": "Estás recibiendo este email porque se ha solicitado un cambio de contraseña para tu cuenta.", + "This password reset link will expire in :count minutes.": "Este enlace para restablecer la contraseña caduca en :count minutos.", + "If you did not request a password reset, no further action is required.": "Si no has solicitado un cambio de contraseña, puedes ignorar o eliminar este e-mail.", + "Please confirm your password before continuing.": "Por favor confirme su contraseña antes de continuar.", + "Regards": "Saludos", + "Whoops!": "¡Ups!", + "Hello!": "¡Hola!", + "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser: [:actionURL](:actionURL)": "Si tienes problemas haciendo click en el botón \":actionText\", copia y pega el siguiente\nenlace en tu navegador: [:actionURL](:actionURL)", + "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser: [:displayableActionUrl](:actionURL)": "Si tienes problemas haciendo click en el botón \":actionText\", copia y pega el siguiente\nenlace en tu navegador: [:displayableActionUrl](:actionURL)", + "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si tienes problemas haciendo click en el botón \":actionText\", copia y pega el siguiente\nenlace en tu navegador:", + "Send Password Reset Link": "Enviar enlace para restablecer contraseña", + "Logout": "Cerrar sesión", + "Verify Email Address": "Confirmar correo electrónico", + "Please click the button below to verify your email address.": "Por favor pulsa el siguiente botón para confirmar tu correo electrónico.", + "If you did not create an account, no further action is required.": "Si no has creado ninguna cuenta, puedes ignorar o eliminar este e-mail.", + "Verify Your Email Address": "Confirma tu correo electrónico", + "A fresh verification link has been sent to your email address.": "Se ha enviado un nuevo enlace de verificación a tu correo electrónico.", + "Before proceeding, please check your email for a verification link.": "Antes de poder continuar, por favor, confirma tu correo electrónico con el enlace que te hemos enviado.", + "If you did not receive the email": "Si no has recibido el email", + "click here to request another": "pulsa aquí para que te enviemos otro", + "All rights reserved.": "Todos los derechos reservados." +} diff --git a/resources/lang/es/app.php b/resources/lang/es/app.php new file mode 100644 index 0000000..b34a430 --- /dev/null +++ b/resources/lang/es/app.php @@ -0,0 +1,4 @@ + 'Aplicación Multi-Idioma', +]; \ No newline at end of file diff --git a/resources/lang/es/auth.php b/resources/lang/es/auth.php new file mode 100644 index 0000000..3c5fd5e --- /dev/null +++ b/resources/lang/es/auth.php @@ -0,0 +1,19 @@ + 'Estas credenciales no coinciden con nuestros registros.', + 'throttle' => 'Demasiados intentos de acceso. Por favor inténtelo de nuevo en :seconds segundos.', + +]; diff --git a/resources/lang/es/pagination.php b/resources/lang/es/pagination.php new file mode 100644 index 0000000..325916d --- /dev/null +++ b/resources/lang/es/pagination.php @@ -0,0 +1,19 @@ + '« Anterior', + 'next' => 'Siguiente »', + +]; diff --git a/resources/lang/es/passwords.php b/resources/lang/es/passwords.php new file mode 100644 index 0000000..61fee72 --- /dev/null +++ b/resources/lang/es/passwords.php @@ -0,0 +1,22 @@ + '¡Su contraseña ha sido restablecida!', + 'sent' => '¡Recordatorio de contraseña enviado!', + 'token' => 'Este token de restablecimiento de contraseña es inválido.', + 'user' => 'No se ha encontrado un usuario con esa dirección de correo.', + 'throttled' => 'Por favor espere antes de volver a intentarlo.', + 'password' => 'Las contraseñas deben tener al menos seis caracteres y coincidir con la confirmación.' +]; diff --git a/resources/lang/es/validation.php b/resources/lang/es/validation.php new file mode 100644 index 0000000..ef444d3 --- /dev/null +++ b/resources/lang/es/validation.php @@ -0,0 +1,151 @@ + 'El campo :attribute debe ser aceptado.', + 'active_url' => 'El campo :attribute no es una URL válida.', + 'after' => 'El campo :attribute debe ser una fecha posterior a :date.', + 'after_or_equal' => 'El campo :attribute debe ser una fecha posterior o igual a :date.', + 'alpha' => 'El campo :attribute solo puede contener letras.', + 'alpha_dash' => 'El campo :attribute solo puede contener letras, números, guiones y guiones bajos.', + 'alpha_num' => 'El campo :attribute solo puede contener letras y números.', + 'array' => 'El campo :attribute debe ser un array.', + 'before' => 'El campo :attribute debe ser una fecha anterior a :date.', + 'before_or_equal' => 'El campo :attribute debe ser una fecha anterior o igual a :date.', + 'between' => [ + 'numeric' => 'El campo :attribute debe ser un valor entre :min y :max.', + 'file' => 'El archivo :attribute debe pesar entre :min y :max kilobytes.', + 'string' => 'El campo :attribute debe contener entre :min y :max caracteres.', + 'array' => 'El campo :attribute debe contener entre :min y :max elementos.', + ], + 'boolean' => 'El campo :attribute debe ser verdadero o falso.', + 'confirmed' => 'El campo confirmación de :attribute no coincide.', + 'date' => 'El campo :attribute no corresponde con una fecha válida.', + 'date_equals' => 'El campo :attribute debe ser una fecha igual a :date.', + 'date_format' => 'El campo :attribute no corresponde con el formato de fecha :format.', + 'different' => 'Los campos :attribute y :other deben ser diferentes.', + 'digits' => 'El campo :attribute debe ser un número de :digits dígitos.', + 'digits_between' => 'El campo :attribute debe contener entre :min y :max dígitos.', + 'dimensions' => 'El campo :attribute tiene dimensiones de imagen inválidas.', + 'distinct' => 'El campo :attribute tiene un valor duplicado.', + 'email' => 'El campo :attribute debe ser una dirección de correo válida.', + 'ends_with' => 'El campo :attribute debe finalizar con alguno de los siguientes valores: :values', + 'exists' => 'El campo :attribute seleccionado no existe.', + 'file' => 'El campo :attribute debe ser un archivo.', + 'filled' => 'El campo :attribute debe tener un valor.', + 'gt' => [ + 'numeric' => 'El campo :attribute debe ser mayor a :value.', + 'file' => 'El archivo :attribute debe pesar más de :value kilobytes.', + 'string' => 'El campo :attribute debe contener más de :value caracteres.', + 'array' => 'El campo :attribute debe contener más de :value elementos.', + ], + 'gte' => [ + 'numeric' => 'El campo :attribute debe ser mayor o igual a :value.', + 'file' => 'El archivo :attribute debe pesar :value o más kilobytes.', + 'string' => 'El campo :attribute debe contener :value o más caracteres.', + 'array' => 'El campo :attribute debe contener :value o más elementos.', + ], + 'image' => 'El campo :attribute debe ser una imagen.', + 'in' => 'El campo :attribute es inválido.', + 'in_array' => 'El campo :attribute no existe en :other.', + 'integer' => 'El campo :attribute debe ser un número entero.', + 'ip' => 'El campo :attribute debe ser una dirección IP válida.', + 'ipv4' => 'El campo :attribute debe ser una dirección IPv4 válida.', + 'ipv6' => 'El campo :attribute debe ser una dirección IPv6 válida.', + 'json' => 'El campo :attribute debe ser una cadena de texto JSON válida.', + 'lt' => [ + 'numeric' => 'El campo :attribute debe ser menor a :value.', + 'file' => 'El archivo :attribute debe pesar menos de :value kilobytes.', + 'string' => 'El campo :attribute debe contener menos de :value caracteres.', + 'array' => 'El campo :attribute debe contener menos de :value elementos.', + ], + 'lte' => [ + 'numeric' => 'El campo :attribute debe ser menor o igual a :value.', + 'file' => 'El archivo :attribute debe pesar :value o menos kilobytes.', + 'string' => 'El campo :attribute debe contener :value o menos caracteres.', + 'array' => 'El campo :attribute debe contener :value o menos elementos.', + ], + 'max' => [ + 'numeric' => 'El campo :attribute no debe ser mayor a :max.', + 'file' => 'El archivo :attribute no debe pesar más de :max kilobytes.', + 'string' => 'El campo :attribute no debe contener más de :max caracteres.', + 'array' => 'El campo :attribute no debe contener más de :max elementos.', + ], + 'mimes' => 'El campo :attribute debe ser un archivo de tipo: :values.', + 'mimetypes' => 'El campo :attribute debe ser un archivo de tipo: :values.', + 'min' => [ + 'numeric' => 'El campo :attribute debe ser al menos :min.', + 'file' => 'El archivo :attribute debe pesar al menos :min kilobytes.', + 'string' => 'El campo :attribute debe contener al menos :min caracteres.', + 'array' => 'El campo :attribute debe contener al menos :min elementos.', + ], + 'not_in' => 'El campo :attribute seleccionado es inválido.', + 'not_regex' => 'El formato del campo :attribute es inválido.', + 'numeric' => 'El campo :attribute debe ser un número.', + 'password' => 'La contraseña es incorrecta.', + 'present' => 'El campo :attribute debe estar presente.', + 'regex' => 'El formato del campo :attribute es inválido.', + 'required' => 'El campo :attribute es obligatorio.', + 'required_if' => 'El campo :attribute es obligatorio cuando el campo :other es :value.', + 'required_unless' => 'El campo :attribute es requerido a menos que :other se encuentre en :values.', + 'required_with' => 'El campo :attribute es obligatorio cuando :values está presente.', + 'required_with_all' => 'El campo :attribute es obligatorio cuando :values están presentes.', + 'required_without' => 'El campo :attribute es obligatorio cuando :values no está presente.', + 'required_without_all' => 'El campo :attribute es obligatorio cuando ninguno de los campos :values están presentes.', + 'same' => 'Los campos :attribute y :other deben coincidir.', + 'size' => [ + 'numeric' => 'El campo :attribute debe ser :size.', + 'file' => 'El archivo :attribute debe pesar :size kilobytes.', + 'string' => 'El campo :attribute debe contener :size caracteres.', + 'array' => 'El campo :attribute debe contener :size elementos.', + ], + 'starts_with' => 'El campo :attribute debe comenzar con uno de los siguientes valores: :values', + 'string' => 'El campo :attribute debe ser una cadena de caracteres.', + 'timezone' => 'El campo :attribute debe ser una zona horaria válida.', + 'unique' => 'El valor del campo :attribute ya está en uso.', + 'uploaded' => 'El campo :attribute no se pudo subir.', + 'url' => 'El formato del campo :attribute es inválido.', + 'uuid' => 'El campo :attribute debe ser un UUID válido.', + + /* + |-------------------------------------------------------------------------- + | 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 attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [], + +]; From 10d0d27cf6a871f2cdb83593513b13be29423b02 Mon Sep 17 00:00:00 2001 From: levifvy Date: Sun, 23 Jul 2023 01:52:46 +0200 Subject: [PATCH 02/33] Adding static translations functions --- .../Controllers/LocalizationController.php | 18 + app/Http/Kernel.php | 1 + app/Http/Middleware/Localization.php | 26 + app/Providers/RouteServiceProvider.php | 2 + composer.json | 2 + composer.lock | 1039 +++++++++++++++-- config/app.php | 2 +- resources/lang/ca.json | 39 + resources/lang/ca/auth.php | 9 + resources/lang/ca/http-statuses.php | 84 ++ resources/lang/ca/pagination.php | 8 + resources/lang/ca/passwords.php | 11 + resources/lang/ca/validation.php | 217 ++++ resources/lang/en.json | 39 + resources/lang/en/app.php | 8 +- resources/lang/en/auth.php | 19 +- resources/lang/en/http-statuses.php | 84 ++ resources/lang/en/pagination.php | 17 +- resources/lang/en/passwords.php | 23 +- resources/lang/en/validation.php | 368 +++--- resources/lang/es.json | 72 +- resources/lang/es/app.php | 7 +- resources/lang/es/auth.php | 20 +- resources/lang/es/http-statuses.php | 84 ++ resources/lang/es/pagination.php | 17 +- resources/lang/es/passwords.php | 26 +- resources/lang/es/validation.php | 278 +++-- resources/lang/fr.json | 39 + resources/lang/fr/auth.php | 9 + resources/lang/fr/http-statuses.php | 84 ++ resources/lang/fr/pagination.php | 8 + resources/lang/fr/passwords.php | 11 + resources/lang/fr/validation.php | 217 ++++ routes/api.php | 2 + 34 files changed, 2403 insertions(+), 487 deletions(-) create mode 100644 app/Http/Controllers/LocalizationController.php create mode 100644 app/Http/Middleware/Localization.php create mode 100644 resources/lang/ca.json create mode 100644 resources/lang/ca/auth.php create mode 100644 resources/lang/ca/http-statuses.php create mode 100644 resources/lang/ca/pagination.php create mode 100644 resources/lang/ca/passwords.php create mode 100644 resources/lang/ca/validation.php create mode 100644 resources/lang/en.json create mode 100644 resources/lang/en/http-statuses.php create mode 100644 resources/lang/es/http-statuses.php create mode 100644 resources/lang/fr.json create mode 100644 resources/lang/fr/auth.php create mode 100644 resources/lang/fr/http-statuses.php create mode 100644 resources/lang/fr/pagination.php create mode 100644 resources/lang/fr/passwords.php create mode 100644 resources/lang/fr/validation.php diff --git a/app/Http/Controllers/LocalizationController.php b/app/Http/Controllers/LocalizationController.php new file mode 100644 index 0000000..e54c15b --- /dev/null +++ b/app/Http/Controllers/LocalizationController.php @@ -0,0 +1,18 @@ +put('locale', $locale); + + return redirect()->back(); + } +} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index c34cdcf..3fb73a5 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -42,6 +42,7 @@ class Kernel extends HttpKernel // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', \Illuminate\Routing\Middleware\SubstituteBindings::class, + \App\Http\Middleware\Localization::class, ], ]; diff --git a/app/Http/Middleware/Localization.php b/app/Http/Middleware/Localization.php new file mode 100644 index 0000000..c409352 --- /dev/null +++ b/app/Http/Middleware/Localization.php @@ -0,0 +1,26 @@ +has('locale')){ + + App::setLocale(session()->get('locale')); + } + + return $next($request); + } +} diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 0c18923..c12cd71 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -19,6 +19,8 @@ class RouteServiceProvider extends ServiceProvider */ public const HOME = '/home'; + protected $namespace = 'App\\Http\\Controllers'; + /** * Define your route model bindings, pattern filters, and other route configuration. */ diff --git a/composer.json b/composer.json index 8563c2d..d59e215 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,8 @@ }, "require-dev": { "fakerphp/faker": "^1.9.1", + "laravel-lang/common": "^3.1", + "laravel-lang/publisher": "^14.6", "laravel/pint": "^1.0", "laravel/sail": "^1.18", "mockery/mockery": "^1.4.4", diff --git a/composer.lock b/composer.lock index 441beb9..4cd54fd 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": "c4029cb829b5dfe9c6e99034cd0855c3", + "content-hash": "6036e773e70a9ba0ff7c5959db604ee4", "packages": [ { "name": "brick/math", @@ -7137,51 +7137,761 @@ } ], "packages-dev": [ + { + "name": "archtechx/enums", + "version": "v0.3.2", + "source": { + "type": "git", + "url": "https://github.com/archtechx/enums.git", + "reference": "475f45e682b0771253707f9403b704759a08da5f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/archtechx/enums/zipball/475f45e682b0771253707f9403b704759a08da5f", + "reference": "475f45e682b0771253707f9403b704759a08da5f", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "nunomaduro/larastan": "^1.0|^2.4", + "orchestra/testbench": "^6.9|^7.0|^8.0", + "pestphp/pest": "^1.2|^2.0", + "pestphp/pest-plugin-laravel": "^1.0|^2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "ArchTech\\Enums\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Samuel Štancl", + "email": "samuel@archte.ch" + } + ], + "description": "Helpers for making PHP enums more lovable.", + "support": { + "issues": "https://github.com/archtechx/enums/issues", + "source": "https://github.com/archtechx/enums/tree/v0.3.2" + }, + "time": "2023-02-15T13:05:41+00:00" + }, + { + "name": "composer/semver", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-04-01T19:23:25+00:00" + }, + { + "name": "dragon-code/contracts", + "version": "v2.20.0", + "source": { + "type": "git", + "url": "https://github.com/TheDragonCode/contracts.git", + "reference": "410d35bec404f465a126bb1e672f3abe1150f5d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TheDragonCode/contracts/zipball/410d35bec404f465a126bb1e672f3abe1150f5d7", + "reference": "410d35bec404f465a126bb1e672f3abe1150f5d7", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-message": "^1.0.1 || ^2.0", + "symfony/http-kernel": "^4.0 || ^5.0 || ^6.0", + "symfony/polyfill-php80": "^1.23" + }, + "conflict": { + "andrey-helldar/contracts": "*" + }, + "require-dev": { + "illuminate/database": "^10.0", + "phpdocumentor/reflection-docblock": "^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "DragonCode\\Contracts\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andrey Helldar", + "email": "helldar@dragon-code.pro", + "homepage": "https://github.com/andrey-helldar" + } + ], + "description": "A set of contracts for any project", + "keywords": [ + "contracts", + "interfaces" + ], + "support": { + "source": "https://github.com/TheDragonCode/contracts" + }, + "funding": [ + { + "url": "https://boosty.to/dragon-code", + "type": "boosty" + }, + { + "url": "https://github.com/sponsors/TheDragonCode", + "type": "github" + }, + { + "url": "https://opencollective.com/dragon-code", + "type": "open_collective" + }, + { + "url": "https://yoomoney.ru/to/410012608840929", + "type": "yoomoney" + } + ], + "time": "2023-06-02T11:06:31+00:00" + }, + { + "name": "dragon-code/pretty-array", + "version": "v4.1.0", + "source": { + "type": "git", + "url": "https://github.com/TheDragonCode/pretty-array.git", + "reference": "6c84e2454491b414efbd37985c322712cdf9012f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TheDragonCode/pretty-array/zipball/6c84e2454491b414efbd37985c322712cdf9012f", + "reference": "6c84e2454491b414efbd37985c322712cdf9012f", + "shasum": "" + }, + "require": { + "dragon-code/contracts": "^2.20", + "dragon-code/support": "^6.11.2", + "ext-dom": "*", + "ext-mbstring": "*", + "php": "^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^10.2" + }, + "suggest": { + "symfony/thanks": "Give thanks (in the form of a GitHub) to your fellow PHP package maintainers" + }, + "type": "library", + "autoload": { + "psr-4": { + "DragonCode\\PrettyArray\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andrey Helldar", + "email": "helldar@dragon-code.pro", + "homepage": "https://github.com/andrey-helldar" + } + ], + "description": "Simple conversion of an array to a pretty view", + "keywords": [ + "andrey helldar", + "array", + "dragon", + "dragon code", + "pretty", + "pretty array" + ], + "support": { + "issues": "https://github.com/TheDragonCode/pretty-array/issues", + "source": "https://github.com/TheDragonCode/pretty-array" + }, + "funding": [ + { + "url": "https://boosty.to/dragon-code", + "type": "boosty" + }, + { + "url": "https://github.com/sponsors/TheDragonCode", + "type": "github" + }, + { + "url": "https://opencollective.com/dragon-code", + "type": "open_collective" + }, + { + "url": "https://yoomoney.ru/to/410012608840929", + "type": "yoomoney" + } + ], + "time": "2023-06-02T11:37:44+00:00" + }, + { + "name": "dragon-code/support", + "version": "v6.11.2", + "source": { + "type": "git", + "url": "https://github.com/TheDragonCode/support.git", + "reference": "81b4432f35ee5d1d7a310669ccc698d78b3e83a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TheDragonCode/support/zipball/81b4432f35ee5d1d7a310669ccc698d78b3e83a6", + "reference": "81b4432f35ee5d1d7a310669ccc698d78b3e83a6", + "shasum": "" + }, + "require": { + "dragon-code/contracts": "^2.19.1", + "ext-bcmath": "*", + "ext-ctype": "*", + "ext-dom": "*", + "ext-json": "*", + "ext-mbstring": "*", + "php": "^8.0", + "psr/http-message": "^1.0.1 || ^2.0", + "symfony/polyfill-php81": "^1.25", + "voku/portable-ascii": "^1.4.8 || ^2.0.1" + }, + "conflict": { + "andrey-helldar/support": "*" + }, + "require-dev": { + "illuminate/contracts": "^9.0 || ^10.0", + "phpunit/phpunit": "^9.6", + "symfony/var-dumper": "^6.0" + }, + "suggest": { + "dragon-code/laravel-support": "Various helper files for the Laravel and Lumen frameworks", + "symfony/thanks": "Give thanks (in the form of a GitHub) to your fellow PHP package maintainers" + }, + "type": "library", + "extra": { + "dragon-code": { + "docs-generator": { + "preview": { + "brand": "php", + "vendor": "The Dragon Code" + } + } + } + }, + "autoload": { + "psr-4": { + "DragonCode\\Support\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andrey Helldar", + "email": "helldar@dragon-code.pro", + "homepage": "https://github.com/andrey-helldar" + } + ], + "description": "Support package is a collection of helpers and tools for any project.", + "keywords": [ + "dragon", + "dragon-code", + "framework", + "helper", + "helpers", + "laravel", + "php", + "support", + "symfony", + "yii", + "yii2" + ], + "support": { + "issues": "https://github.com/TheDragonCode/support/issues", + "source": "https://github.com/TheDragonCode/support" + }, + "funding": [ + { + "url": "https://boosty.to/dragon-code", + "type": "boosty" + }, + { + "url": "https://github.com/sponsors/TheDragonCode", + "type": "github" + }, + { + "url": "https://opencollective.com/dragon-code", + "type": "open_collective" + }, + { + "url": "https://yoomoney.ru/to/410012608840929", + "type": "yoomoney" + } + ], + "time": "2023-04-19T08:29:55+00:00" + }, { "name": "fakerphp/faker", "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/FakerPHP/Faker.git", - "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01" + "url": "https://github.com/FakerPHP/Faker.git", + "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", + "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "conflict": { + "fzaninotto/faker": "*" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "doctrine/persistence": "^1.3 || ^2.0", + "ext-intl": "*", + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" + }, + "suggest": { + "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", + "ext-curl": "Required by Faker\\Provider\\Image to download images.", + "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", + "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", + "ext-mbstring": "Required for multibyte Unicode string functionality." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "v1.21-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "support": { + "issues": "https://github.com/FakerPHP/Faker/issues", + "source": "https://github.com/FakerPHP/Faker/tree/v1.23.0" + }, + "time": "2023-06-12T08:44:38+00:00" + }, + { + "name": "filp/whoops", + "version": "2.15.2", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", + "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", + "shasum": "" + }, + "require": { + "php": "^5.5.9 || ^7.0 || ^8.0", + "psr/log": "^1.0.1 || ^2.0 || ^3.0" + }, + "require-dev": { + "mockery/mockery": "^0.9 || ^1.0", + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "support": { + "issues": "https://github.com/filp/whoops/issues", + "source": "https://github.com/filp/whoops/tree/2.15.2" + }, + "funding": [ + { + "url": "https://github.com/denis-sokolov", + "type": "github" + } + ], + "time": "2023-04-12T12:00:00+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, + "time": "2020-07-09T08:09:16+00:00" + }, + { + "name": "laravel-lang/attributes", + "version": "v2.3.3", + "source": { + "type": "git", + "url": "https://github.com/Laravel-Lang/attributes.git", + "reference": "866473306491d9b84d37dfbb80193ce8099368ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Laravel-Lang/attributes/zipball/866473306491d9b84d37dfbb80193ce8099368ad", + "reference": "866473306491d9b84d37dfbb80193ce8099368ad", + "shasum": "" + }, + "require": { + "ext-json": "*", + "laravel-lang/publisher": "^14.0", + "php": "^8.1" + }, + "require-dev": { + "laravel-lang/status-generator": "^1.3", + "phpunit/phpunit": "^9.6", + "symfony/var-dumper": "^6.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "LaravelLang\\Attributes\\ServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "LaravelLang\\Attributes\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andrey Helldar", + "email": "helldar@dragon-code.pro" + }, + { + "name": "Laravel-Lang Team", + "homepage": "https://github.com/Laravel-Lang" + } + ], + "description": "List of 78 languages for form field names", + "keywords": [ + "attributes", + "fields", + "form", + "lang", + "languages", + "laravel", + "messages", + "translations", + "validation" + ], + "support": { + "issues": "https://github.com/Laravel-Lang/attributes/issues", + "source": "https://github.com/Laravel-Lang/attributes/tree/v2.3.3" + }, + "funding": [ + { + "url": "https://opencollective.com/laravel-lang", + "type": "open_collective" + } + ], + "time": "2023-04-03T16:25:20+00:00" + }, + { + "name": "laravel-lang/common", + "version": "v3.1.1", + "source": { + "type": "git", + "url": "https://github.com/Laravel-Lang/common.git", + "reference": "ce2d52543846052dc79de6d3060044b49545e018" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", - "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", + "url": "https://api.github.com/repos/Laravel-Lang/common/zipball/ce2d52543846052dc79de6d3060044b49545e018", + "reference": "ce2d52543846052dc79de6d3060044b49545e018", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0", - "psr/container": "^1.0 || ^2.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" + "laravel-lang/attributes": "^2.0", + "laravel-lang/http-statuses": "^3.0", + "laravel-lang/lang": "^12.0", + "laravel-lang/publisher": "^14.0", + "php": "^8.0" + }, + "require-dev": { + "orchestra/testbench": "^6.0 || ^7.0 || ^8.0", + "phpunit/phpunit": "^9.6", + "symfony/var-dumper": "^5.4 || ^6.0" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laravel-Lang Team", + "homepage": "https://github.com/Laravel-Lang" + }, + { + "name": "Andrey Helldar", + "email": "helldar@dragon-code.pro", + "homepage": "https://github.com/andrey-helldar" + } + ], + "description": "Easily connect the necessary language packs to the application", + "keywords": [ + "Laravel-lang", + "attribute", + "attributes", + "http", + "http-status", + "http-status-code", + "i18n", + "lang", + "language", + "languages", + "laravel", + "locale", + "locales", + "publisher", + "translation", + "translations" + ], + "support": { + "issues": "https://github.com/Laravel-Lang/common/issues", + "source": "https://github.com/Laravel-Lang/common" + }, + "funding": [ + { + "url": "https://opencollective.com/laravel-lang", + "type": "open_collective" + } + ], + "time": "2023-02-17T12:46:13+00:00" + }, + { + "name": "laravel-lang/http-statuses", + "version": "v3.3.1", + "source": { + "type": "git", + "url": "https://github.com/Laravel-Lang/http-statuses.git", + "reference": "5d9770879bf279dfe10b4f50e370c615be65541a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Laravel-Lang/http-statuses/zipball/5d9770879bf279dfe10b4f50e370c615be65541a", + "reference": "5d9770879bf279dfe10b4f50e370c615be65541a", + "shasum": "" + }, + "require": { + "ext-json": "*", + "laravel-lang/publisher": "^14.1", + "php": "^8.1" }, "conflict": { - "fzaninotto/faker": "*" + "laravel-lang/publisher": "<14.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "doctrine/persistence": "^1.3 || ^2.0", - "ext-intl": "*", - "phpunit/phpunit": "^9.5.26", - "symfony/phpunit-bridge": "^5.4.16" - }, - "suggest": { - "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", - "ext-curl": "Required by Faker\\Provider\\Image to download images.", - "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", - "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", - "ext-mbstring": "Required for multibyte Unicode string functionality." + "laravel-lang/status-generator": "^1.3.4", + "phpunit/phpunit": "^9.6", + "symfony/var-dumper": "^6.0" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "v1.21-dev" + "laravel": { + "providers": [ + "LaravelLang\\HttpStatuses\\ServiceProvider" + ] } }, "autoload": { "psr-4": { - "Faker\\": "src/Faker/" + "LaravelLang\\HttpStatuses\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -7190,57 +7900,71 @@ ], "authors": [ { - "name": "François Zaninotto" + "name": "Andrey Helldar", + "email": "helldar@dragon-code.pro" + }, + { + "name": "Laravel-Lang Team", + "homepage": "https://github.com/Laravel-Lang" } ], - "description": "Faker is a PHP library that generates fake data for you.", + "description": "List of 78 languages for HTTP statuses", "keywords": [ - "data", - "faker", - "fixtures" + "http", + "lang", + "languages", + "laravel", + "messages", + "status", + "translations" ], "support": { - "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.23.0" + "issues": "https://github.com/Laravel-Lang/http-statuses/issues", + "source": "https://github.com/Laravel-Lang/http-statuses/tree/v3.3.1" }, - "time": "2023-06-12T08:44:38+00:00" + "funding": [ + { + "url": "https://opencollective.com/laravel-lang", + "type": "open_collective" + } + ], + "time": "2023-04-03T16:25:01+00:00" }, { - "name": "filp/whoops", - "version": "2.15.2", + "name": "laravel-lang/lang", + "version": "12.24.0", "source": { "type": "git", - "url": "https://github.com/filp/whoops.git", - "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73" + "url": "https://github.com/Laravel-Lang/lang.git", + "reference": "5b779cda146f36b63381cdc010ddfe11641091ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", - "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", + "url": "https://api.github.com/repos/Laravel-Lang/lang/zipball/5b779cda146f36b63381cdc010ddfe11641091ab", + "reference": "5b779cda146f36b63381cdc010ddfe11641091ab", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", - "psr/log": "^1.0.1 || ^2.0 || ^3.0" + "ext-json": "*", + "laravel-lang/publisher": "^14.0", + "php": "^8.1" }, "require-dev": { - "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", - "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" - }, - "suggest": { - "symfony/var-dumper": "Pretty print complex values better with var-dumper available", - "whoops/soap": "Formats errors as SOAP responses" + "laravel-lang/status-generator": "^1.15", + "phpunit/phpunit": "^9.6", + "symfony/var-dumper": "^6.0" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.7-dev" + "laravel": { + "providers": [ + "LaravelLang\\Lang\\ServiceProvider" + ] } }, "autoload": { "psr-4": { - "Whoops\\": "src/Whoops/" + "LaravelLang\\Lang\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -7249,83 +7973,135 @@ ], "authors": [ { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp", - "role": "Developer" + "name": "Laravel-Lang Team", + "homepage": "https://github.com/Laravel-Lang" } ], - "description": "php error handling for cool kids", - "homepage": "https://filp.github.io/whoops/", + "description": "List of 78 languages for Laravel Framework, Laravel Jetstream, Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova, Laravel Spark and Laravel UI", "keywords": [ - "error", - "exception", - "handling", - "library", - "throwable", - "whoops" + "lang", + "languages", + "laravel", + "lpm" ], "support": { - "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.2" + "issues": "https://github.com/Laravel-Lang/lang/issues", + "source": "https://github.com/Laravel-Lang/lang" }, "funding": [ { - "url": "https://github.com/denis-sokolov", - "type": "github" + "url": "https://opencollective.com/laravel-lang", + "type": "open_collective" } ], - "time": "2023-04-12T12:00:00+00:00" + "time": "2023-07-22T09:53:38+00:00" }, { - "name": "hamcrest/hamcrest-php", - "version": "v2.0.1", + "name": "laravel-lang/publisher", + "version": "v14.6.4", "source": { "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + "url": "https://github.com/Laravel-Lang/publisher.git", + "reference": "a6df495f4c8bb7e8555cfbf82070bd417fbef9bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "url": "https://api.github.com/repos/Laravel-Lang/publisher/zipball/a6df495f4c8bb7e8555cfbf82070bd417fbef9bb", + "reference": "a6df495f4c8bb7e8555cfbf82070bd417fbef9bb", "shasum": "" }, "require": { - "php": "^5.3|^7.0|^8.0" + "archtechx/enums": "^0.3", + "composer/semver": "^3.3", + "dragon-code/pretty-array": "^4.0", + "dragon-code/support": "^6.3", + "ext-json": "*", + "illuminate/console": "^8.79 || ^9.18 || ^10.0", + "illuminate/support": "^8.79 || ^9.18 || ^10.0", + "league/commonmark": "^2.3", + "league/config": "^1.2", + "php": "^8.1" }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" + "conflict": { + "laravel-lang/attributes": "<2.0", + "laravel-lang/http-statuses": "<3.0", + "laravel-lang/lang": "<11.0" }, "require-dev": { - "phpunit/php-file-iterator": "^1.4 || ^2.0", - "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + "laravel-lang/json-fallback-hotfix": "^1.0", + "orchestra/testbench": "^6.25 || ^7.22 || ^8.0", + "phpunit/phpunit": "^9.6", + "symfony/var-dumper": "^5.0 || ^6.0" + }, + "suggest": { + "laravel-lang/attributes": "List of 78 languages for form field names", + "laravel-lang/http-statuses": "List of 78 languages for HTTP statuses", + "laravel-lang/lang": "List of 78 languages for Laravel Framework, Jetstream, Fortify, Breeze, Cashier, Nova, Spark and UI." }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.1-dev" + "laravel": { + "providers": [ + "LaravelLang\\Publisher\\ServiceProvider" + ] } }, "autoload": { - "classmap": [ - "hamcrest" - ] + "files": [ + "helper.php" + ], + "psr-4": { + "LaravelLang\\Publisher\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" + "authors": [ + { + "name": "Andrey Helldar", + "email": "helldar@dragon-code.pro" + }, + { + "name": "Laravel-Lang Team", + "homepage": "https://github.com/Laravel-Lang" + } ], - "support": { - "issues": "https://github.com/hamcrest/hamcrest-php/issues", - "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + "description": "Publisher lang files for the Laravel and Lumen Frameworks, Jetstream, Fortify, Cashier, Spark and Nova from Laravel-Lang/lang", + "keywords": [ + "breeze", + "cashier", + "fortify", + "framework", + "i18n", + "jetstream", + "lang", + "languages", + "laravel", + "locale", + "locales", + "localization", + "lpm", + "lumen", + "nova", + "publisher", + "spark", + "trans", + "translations", + "validations" + ], + "support": { + "issues": "https://github.com/Laravel-Lang/publisher/issues", + "source": "https://github.com/Laravel-Lang/publisher" }, - "time": "2020-07-09T08:09:16+00:00" + "funding": [ + { + "url": "https://opencollective.com/laravel-lang", + "type": "open_collective" + } + ], + "time": "2023-03-31T14:18:17+00:00" }, { "name": "laravel/pint", @@ -9440,6 +10216,85 @@ ], "time": "2023-06-28T13:51:52+00:00" }, + { + "name": "symfony/polyfill-php81", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, { "name": "theseer/tokenizer", "version": "1.2.1", diff --git a/config/app.php b/config/app.php index 6015f6a..4d4bee8 100644 --- a/config/app.php +++ b/config/app.php @@ -82,7 +82,7 @@ | */ - 'locale' => 'es', + 'locale' => 'ca', /* |-------------------------------------------------------------------------- diff --git a/resources/lang/ca.json b/resources/lang/ca.json new file mode 100644 index 0000000..09b1803 --- /dev/null +++ b/resources/lang/ca.json @@ -0,0 +1,39 @@ +{ + "(and :count more error)": "(i :count error més)", + "(and :count more errors)": "(i :count errors més)", + "All rights reserved.": "Tots els drets reservats.", + "Forbidden": "Prohibit", + "Go to page :page": "Aneu a la pàgina :page", + "Hello!": "Hola!", + "If you did not create an account, no further action is required.": "Si no heu creat cap compte, no es requereix cap acció adicional.", + "If you did not request a password reset, no further action is required.": "Si no heu sol·licitat el restabliment de la contrasenya, obvieu aquest correu electrònic.", + "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si té algun problema per a fer clic al botó \":actionText\", copii i enganxi la següent URL al seu navegador web", + "Invalid JSON was returned from the route.": "S'ha retornat un JSON no vàlid des de la ruta.", + "Login": "Entrar", + "Logout": "Sortir", + "Not Found": "No trobat", + "of": "de", + "Page Expired": "Pàgina caducada", + "Pagination Navigation": "Pagination Navegació", + "Payment Required": "Pagament obligatori", + "Please click the button below to verify your email address.": "Si us plau, feu clic al botó inferior per verificar la vostra adreça electrònica.", + "Regards": "Salutacions", + "Register": "Registre", + "Reset Password": "Restablir contrasenya", + "Reset Password Notification": "Notificació de restabliment de contrasenya", + "results": "resultats", + "Server Error": "Error del servidor", + "Service Unavailable": "Servei no disponible", + "Showing": "Mostrant", + "The given data was invalid.": "Les dades proporcionades no eren vàlides.", + "The response is not a streamed response.": "La resposta no és una resposta en streaming.", + "The response is not a view.": "La resposta no és una visió.", + "This password reset link will expire in :count minutes.": "Aquest enllaç de restabliment de contrasenya caducarà en :count minuts.", + "to": "a", + "Toggle navigation": "Commutar navegació", + "Too Many Requests": "Massa peticions", + "Unauthorized": "No autoritzat", + "Verify Email Address": "Confirmeu la vostra adreça electrònica", + "Whoops!": "Vaja!", + "You are receiving this email because we received a password reset request for your account.": "Heu rebut aquest correu electrònic perquè s'ha solicitat el restabliment de la contrasenya per al vostre compte." +} \ No newline at end of file diff --git a/resources/lang/ca/auth.php b/resources/lang/ca/auth.php new file mode 100644 index 0000000..8d7e7a6 --- /dev/null +++ b/resources/lang/ca/auth.php @@ -0,0 +1,9 @@ + 'Aquestes credencials no concorden amb els nostres registres.', + 'password' => 'La contrasenya és incorrecta.', + 'throttle' => 'Ha superat el nombre màxim d\'intents d\'accés. Si us plau, torni a intentar-ho en :seconds segons.', +]; diff --git a/resources/lang/ca/http-statuses.php b/resources/lang/ca/http-statuses.php new file mode 100644 index 0000000..7397e01 --- /dev/null +++ b/resources/lang/ca/http-statuses.php @@ -0,0 +1,84 @@ + 'Error desconegut', + '100' => 'Continua', + '101' => 'Protocols de commutació', + '102' => 'Processament', + '200' => 'D\'acord', + '201' => 'Creat', + '202' => 'Acceptat', + '203' => 'Informació no autoritzada', + '204' => 'Sense contingut', + '205' => 'Restablir contingut', + '206' => 'Contingut parcial', + '207' => 'Multiestatus', + '208' => 'Ja s\'ha informat', + '226' => 'IM utilitzat', + '300' => 'Opcions múltiples', + '301' => 'Mogut permanentment', + '302' => 'Trobat', + '303' => 'Vegeu Altres', + '304' => 'No modificat', + '305' => 'Utilitzeu el proxy', + '307' => 'Redirecció temporal', + '308' => 'Redirecció permanent', + '400' => 'Petició dolenta', + '401' => 'No autoritzat', + '402' => 'Pagament obligatori', + '403' => 'Prohibit', + '404' => 'No trobat', + '405' => 'Mètode no permès', + '406' => 'No és acceptable', + '407' => 'Es requereix autenticació de proxy', + '408' => 'Temps d\'espera esgotat', + '409' => 'Conflicte', + '410' => 'Desaparegut', + '411' => 'Longitud requerida', + '412' => 'La condició prèvia ha fallat', + '413' => 'Càrrega útil massa gran', + '414' => 'URI massa llarg', + '415' => 'Tipus de suport no compatible', + '416' => 'Interval no satisfactori', + '417' => 'L\'expectativa ha fallat', + '418' => 'Sóc una tetera', + '419' => 'La sessió ha caducat', + '421' => 'Sol·licitud mal dirigida', + '422' => 'Entitat no processable', + '423' => 'Tancat', + '424' => 'Dependència fallida', + '425' => 'Massa aviat', + '426' => 'Actualització necessària', + '428' => 'Condició prèvia requerida', + '429' => 'Massa sol·licituds', + '431' => 'Els camps de la capçalera de la sol·licitud són massa grans', + '444' => 'Connexió tancada sense resposta', + '449' => 'Torna-ho a provar amb', + '451' => 'No disponible per motius legals', + '499' => 'Sol·licitud de client tancada', + '500' => 'error del servidor intern', + '501' => 'No implementat', + '502' => 'Porta d\'enllaç incorrecta', + '503' => 'mode de manteniment', + '504' => 'Temps d\'espera de la passarel·la', + '505' => 'Versió HTTP no compatible', + '506' => 'La variant també es negocia', + '507' => 'Emmagatzematge insuficient', + '508' => 'Bucle detectat', + '509' => 'Límit d\'ample de banda excedit', + '510' => 'No ampliat', + '511' => 'Es requereix autenticació de xarxa', + '520' => 'Error desconegut', + '521' => 'El servidor web està caigut', + '522' => 'Temps de connexió esgotat', + '523' => 'L\'origen és inabastable', + '524' => 'S\'ha produït un temps mort', + '525' => 'SSL Handshake ha fallat', + '526' => 'Certificat SSL no vàlid', + '527' => 'Error de canó de ferrocarril', + '598' => 'Error de temps d\'espera de lectura de la xarxa', + '599' => 'Error de temps d\'espera de connexió a la xarxa', + 'unknownError' => 'Error desconegut', +]; diff --git a/resources/lang/ca/pagination.php b/resources/lang/ca/pagination.php new file mode 100644 index 0000000..b59cafe --- /dev/null +++ b/resources/lang/ca/pagination.php @@ -0,0 +1,8 @@ + 'Següent »', + 'previous' => '« Anterior', +]; diff --git a/resources/lang/ca/passwords.php b/resources/lang/ca/passwords.php new file mode 100644 index 0000000..c99cdb2 --- /dev/null +++ b/resources/lang/ca/passwords.php @@ -0,0 +1,11 @@ + 'La contrasenya s\'ha restablert!', + 'sent' => 'Li hem enviat un correu electrònic amb un enllaç per a reiniciar la teva contrasenya!', + 'throttled' => 'Si us plau, esperi abans de tornar-ho a intentar.', + 'token' => 'Aquest token de recuperació de contrasenya és invàlid.', + 'user' => 'No existeix cap usuari amb aquest correu.', +]; diff --git a/resources/lang/ca/validation.php b/resources/lang/ca/validation.php new file mode 100644 index 0000000..4fc8aa9 --- /dev/null +++ b/resources/lang/ca/validation.php @@ -0,0 +1,217 @@ + ':Attribute ha de ser acceptat.', + 'accepted_if' => 'El :attribute s\'ha d\'acceptar quan :other és :value.', + 'active_url' => ':Attribute no és un URL vàlid.', + 'after' => ':Attribute ha de ser una data posterior a :date.', + 'after_or_equal' => ':Attribute ha de ser una data posterior o igual a :date.', + 'alpha' => ':Attribute només pot contenir lletres.', + 'alpha_dash' => ':Attribute només pot contenir lletres, números i guions.', + 'alpha_num' => ':Attribute només pot contenir lletres i números.', + 'array' => ':Attribute ha de ser una matriu.', + 'ascii' => 'El :attribute només ha de contenir caràcters i símbols alfanumèrics d\'un sol byte.', + 'before' => ':Attribute ha de ser una data anterior a :date.', + 'before_or_equal' => ':Attribute ha de ser una data anterior o igual a :date.', + 'between' => [ + 'array' => ':Attribute ha de tenir entre :min - :max ítems.', + 'file' => ':Attribute ha de pesar entre :min - :max kilobytes.', + 'numeric' => ':Attribute ha d\'estar entre :min - :max.', + 'string' => ':Attribute ha de tenir entre :min - :max caràcters.', + ], + 'boolean' => 'El camp :attribute ha de ser verdader o fals', + 'can' => 'El camp :attribute conté un valor no autoritzat.', + 'confirmed' => 'La confirmació de :attribute no coincideix.', + 'current_password' => 'La contrasenya és incorrecta.', + 'date' => ':Attribute no és una data vàlida.', + 'date_equals' => 'El :attribute ha de ser una data igual a :date.', + 'date_format' => 'El camp :attribute no concorda amb el format :format.', + 'decimal' => 'El :attribute ha de tenir :decimal decimals.', + 'declined' => 'Els :attribute s\'han de rebutjar.', + 'declined_if' => 'El :attribute s\'ha de rebutjar quan :other és :value.', + 'different' => ':Attribute i :other han de ser diferents.', + 'digits' => ':Attribute ha de tenir :digits dígits.', + 'digits_between' => ':Attribute ha de tenir entre :min i :max dígits.', + 'dimensions' => 'Les dimensions de la imatge :attribute no són vàlides.', + 'distinct' => 'El camp :attribute té un valor duplicat.', + 'doesnt_end_with' => 'El :attribute no pot acabar amb un dels següents: :values.', + 'doesnt_start_with' => 'El :attribute no pot començar amb un dels següents: :values.', + 'email' => ':Attribute no és un e-mail vàlid', + 'ends_with' => 'La :attribute ha d\'acabar amb una de les següents: :values.', + 'enum' => 'El :attribute seleccionat no és vàlid.', + 'exists' => ':Attribute és invàlid.', + 'file' => 'El camp :attribute ha de ser un arxiu.', + 'filled' => 'El camp :attribute és obligatori.', + 'gt' => [ + 'array' => 'El :attribute ha de tenir més de :value ítems.', + 'file' => 'El :attribute ha de ser superior a :value kilobytes.', + 'numeric' => 'El :attribute ha de ser superior a :value.', + 'string' => 'El :attribute ha de superar els :value caràcters.', + ], + 'gte' => [ + 'array' => 'El :attribute ha de tenir :value ítems o més.', + 'file' => 'El :attribute ha de ser igual o superior a :value kilobytes.', + 'numeric' => 'El :attribute ha de ser igual o superior a :value.', + 'string' => 'El :attribute ha de ser igual o superior a :value caràcters.', + ], + 'image' => ':Attribute ha de ser una imatge.', + 'in' => ':Attribute és invàlid', + 'in_array' => 'El camp :attribute no existeix dintre de :other.', + 'integer' => ':Attribute ha de ser un nombre enter.', + 'ip' => ':Attribute ha de ser una adreça IP vàlida.', + 'ipv4' => ':Attribute ha de ser una adreça IPv4 vàlida.', + 'ipv6' => ':Attribute ha de ser una adreça IPv6 vàlida.', + 'json' => 'El camp :attribute ha de ser una cadena JSON vàlida.', + 'lowercase' => 'El :attribute ha d\'anar en minúscula.', + 'lt' => [ + 'array' => 'El :attribute ha de tenir menys de :value ítems.', + 'file' => 'El :attribute ha de ser inferior a :value kilobytes.', + 'numeric' => 'El :attribute ha de ser inferior a :value.', + 'string' => 'El :attribute no ha de superar els :value caràcters.', + ], + 'lte' => [ + 'array' => 'El :attribute no ha de tenir més de :value ítems.', + 'file' => 'El :attribute ha de ser igual o inferior a :value kilobytes.', + 'numeric' => 'El :attribute ha de ser igual o inferior a :value.', + 'string' => 'El :attribute ha de ser igual o inferior a :value caràcters.', + ], + 'mac_address' => 'El :attribute ha de ser una adreça MAC vàlida.', + 'max' => [ + 'array' => ':Attribute no pot tenir més de :max ítems.', + 'file' => ':Attribute no pot ser més gran que :max kilobytes.', + 'numeric' => ':Attribute no pot ser més gran que :max.', + 'string' => ':Attribute no pot ser més gran que :max caràcters.', + ], + 'max_digits' => 'El :attribute no ha de tenir més de :max dígits.', + 'mimes' => ':Attribute ha de ser un arxiu amb format: :values.', + 'mimetypes' => ':Attribute ha de ser un arxiu amb format: :values.', + 'min' => [ + 'array' => ':Attribute ha de tenir almenys :min ítems.', + 'file' => 'La mida de :attribute ha de ser d\'almenys :min kilobytes.', + 'numeric' => 'La mida de :attribute ha de ser d\'almenys :min.', + 'string' => ':Attribute ha de contenir almenys :min caràcters.', + ], + 'min_digits' => 'El :attribute ha de tenir almenys :min dígits.', + 'missing' => 'El camp :attribute ha de faltar.', + 'missing_if' => 'El camp :attribute ha de faltar quan :other és :value.', + 'missing_unless' => 'El camp :attribute ha de faltar, tret que :other sigui :value.', + 'missing_with' => 'El camp :attribute ha de faltar quan hi ha :values.', + 'missing_with_all' => 'El camp :attribute ha de faltar quan n\'hi ha :values.', + 'multiple_of' => 'La :attribute ha de ser un múltiple de :value', + 'not_in' => ':Attribute és invàlid.', + 'not_regex' => 'El format de :attribute no és vàlid.', + 'numeric' => ':Attribute ha de ser numèric.', + 'password' => [ + 'letters' => 'El :attribute ha de contenir almenys una lletra.', + 'mixed' => 'El :attribute ha de contenir almenys una lletra majúscula i una minúscula.', + 'numbers' => 'El :attribute ha de contenir almenys un número.', + 'symbols' => 'El :attribute ha de contenir almenys un símbol.', + 'uncompromised' => 'El :attribute donat ha aparegut en una filtració de dades. Si us plau, trieu un :attribute diferent.', + ], + 'present' => 'El camp :attribute ha d\'existir.', + 'prohibited' => 'La :attribute camp està prohibit.', + 'prohibited_if' => 'La :attribute camp és prohibida quan :other és :value.', + 'prohibited_unless' => 'La :attribute camp és prohibida, tret que :other és en :values.', + 'prohibits' => 'El camp :attribute prohibeix la presència de :other.', + 'regex' => 'El format de :attribute és invàlid.', + 'required' => 'El camp :attribute és obligatori.', + 'required_array_keys' => 'El camp :attribute ha de contenir entrades per a: :values.', + 'required_if' => 'El camp :attribute és obligatori quan :other és :value.', + 'required_if_accepted' => 'El camp :attribute és obligatori quan s\'accepta :other.', + 'required_unless' => 'El camp :attribute és obligatori a no ser que :other sigui a :values.', + 'required_with' => 'El camp :attribute és obligatori quan hi ha :values.', + 'required_with_all' => 'El camp :attribute és obligatori quan hi ha :values.', + 'required_without' => 'El camp :attribute és obligatori quan no hi ha :values.', + 'required_without_all' => 'El camp :attribute és obligatori quan no hi ha cap valor dels següents: :values.', + 'same' => ':Attribute i :other han de coincidir.', + 'size' => [ + 'array' => ':Attribute ha de contenir :size ítems.', + 'file' => 'La mida de :attribute ha de ser :size kilobytes.', + 'numeric' => 'La mida de :attribute ha de ser :size.', + 'string' => ':Attribute ha de contenir :size caràcters.', + ], + 'starts_with' => 'El :attribute ha de començar per un dels valors següents: :values', + 'string' => 'El camp :attribute ha de ser una cadena.', + 'timezone' => 'El camp :attribute ha de ser una zona vàlida.', + 'ulid' => 'El :attribute ha de ser un ULID vàlid.', + 'unique' => ':Attribute ja està registrat i no es pot repetir.', + 'uploaded' => ':Attribute ha fallat al pujar.', + 'uppercase' => 'El :attribute ha d\'anar en majúscula.', + 'url' => ':Attribute no és una adreça web vàlida.', + 'uuid' => 'El :attribute ha de ser un indentificador únic universal (UUID) vàlid.', + 'attributes' => [ + 'address' => 'adreça', + 'age' => 'edat', + 'amount' => 'quantitat', + 'area' => 'zona', + 'available' => 'disponible', + 'birthday' => 'aniversari', + 'body' => 'cos', + 'city' => 'ciutat', + 'content' => 'contingut', + 'country' => 'país', + 'created_at' => 'creat a', + 'creator' => 'creador', + 'current_password' => 'Contrasenya actual', + 'date' => 'data', + 'date_of_birth' => 'data de naixement', + 'day' => 'dia', + 'deleted_at' => 'esborrat a les', + 'description' => 'descripció', + 'district' => 'districte', + 'duration' => 'durada', + 'email' => 'adreça electrònica', + 'excerpt' => 'extracte', + 'filter' => 'filtre', + 'first_name' => 'nom', + 'gender' => 'gènere', + 'group' => 'grup', + 'hour' => 'hora', + 'image' => 'imatge', + 'last_name' => 'cognom', + 'lesson' => 'lliçó', + 'line_address_1' => 'adreça de línia 1', + 'line_address_2' => 'adreça de línia 2', + 'message' => 'missatge', + 'middle_name' => 'segon nom', + 'minute' => 'minut', + 'mobile' => 'mòbil', + 'month' => 'mes', + 'name' => 'nom', + 'national_code' => 'codi nacional', + 'number' => 'nombre', + 'password' => 'contrasenya', + 'password_confirmation' => 'confirmació de la contrasenya', + 'phone' => 'telèfon', + 'photo' => 'foto', + 'postal_code' => 'Codi Postal', + 'price' => 'preu', + 'province' => 'província', + 'recaptcha_response_field' => 'camp de resposta recaptcha', + 'remember' => 'recorda', + 'restored_at' => 'restaurat a', + 'result_text_under_image' => 'text del resultat sota la imatge', + 'role' => 'paper', + 'second' => 'segon', + 'sex' => 'sexe', + 'short_text' => 'text breu', + 'size' => 'mida', + 'state' => 'estat', + 'street' => 'carrer', + 'student' => 'estudiant', + 'subject' => 'assumpte', + 'teacher' => 'professor', + 'terms' => 'termes', + 'test_description' => 'descripció de la prova', + 'test_locale' => 'localització de prova', + 'test_name' => 'nom de la prova', + 'text' => 'text', + 'time' => 'hora', + 'title' => 'títol', + 'updated_at' => 'actualitzat a', + 'username' => 'usuari', + 'year' => 'any', + ], +]; diff --git a/resources/lang/en.json b/resources/lang/en.json new file mode 100644 index 0000000..f87d73a --- /dev/null +++ b/resources/lang/en.json @@ -0,0 +1,39 @@ +{ + "(and :count more error)": "(and :count more error)", + "(and :count more errors)": "(and :count more errors)", + "All rights reserved.": "All rights reserved.", + "Forbidden": "Forbidden", + "Go to page :page": "Go to page :page", + "Hello!": "Hello!", + "If you did not create an account, no further action is required.": "If you did not create an account, no further action is required.", + "If you did not request a password reset, no further action is required.": "If you did not request a password reset, no further action is required.", + "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:", + "Invalid JSON was returned from the route.": "Invalid JSON was returned from the route.", + "Login": "Login", + "Logout": "Logout", + "Not Found": "Not Found", + "of": "of", + "Page Expired": "Page Expired", + "Pagination Navigation": "Pagination Navigation", + "Payment Required": "Payment Required", + "Please click the button below to verify your email address.": "Please click the button below to verify your email address.", + "Regards": "Regards", + "Register": "Register", + "Reset Password": "Reset Password", + "Reset Password Notification": "Reset Password Notification", + "results": "results", + "Server Error": "Server Error", + "Service Unavailable": "Service Unavailable", + "Showing": "Showing", + "The given data was invalid.": "The given data was invalid.", + "The response is not a streamed response.": "The response is not a streamed response.", + "The response is not a view.": "The response is not a view.", + "This password reset link will expire in :count minutes.": "This password reset link will expire in :count minutes.", + "to": "to", + "Toggle navigation": "Toggle navigation", + "Too Many Requests": "Too Many Requests", + "Unauthorized": "Unauthorized", + "Verify Email Address": "Verify Email Address", + "Whoops!": "Whoops!", + "You are receiving this email because we received a password reset request for your account.": "You are receiving this email because we received a password reset request for your account." +} \ No newline at end of file diff --git a/resources/lang/en/app.php b/resources/lang/en/app.php index aa2f140..0a4bda8 100644 --- a/resources/lang/en/app.php +++ b/resources/lang/en/app.php @@ -1,4 +1,10 @@ 'Multi-Language Application', + 'name' => 'Multi-Language Application', + 'select_locale' => 'Select your language', + 'example' => 'Example:', + 'articles' => 'Articles:', + 'title' => 'Title', + 'content' => 'Content', + ]; \ No newline at end of file diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php index 6598e2c..6db4982 100644 --- a/resources/lang/en/auth.php +++ b/resources/lang/en/auth.php @@ -1,20 +1,9 @@ 'These credentials do not match our records.', - 'password' => 'The provided password is incorrect.', +return [ + 'failed' => 'These credentials do not match our records.', + 'password' => 'The password is incorrect.', 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', - ]; diff --git a/resources/lang/en/http-statuses.php b/resources/lang/en/http-statuses.php new file mode 100644 index 0000000..3346f78 --- /dev/null +++ b/resources/lang/en/http-statuses.php @@ -0,0 +1,84 @@ + 'Unknown Error', + '100' => 'Continue', + '101' => 'Switching Protocols', + '102' => 'Processing', + '200' => 'OK', + '201' => 'Created', + '202' => 'Accepted', + '203' => 'Non-Authoritative Information', + '204' => 'No Content', + '205' => 'Reset Content', + '206' => 'Partial Content', + '207' => 'Multi-Status', + '208' => 'Already Reported', + '226' => 'IM Used', + '300' => 'Multiple Choices', + '301' => 'Moved Permanently', + '302' => 'Found', + '303' => 'See Other', + '304' => 'Not Modified', + '305' => 'Use Proxy', + '307' => 'Temporary Redirect', + '308' => 'Permanent Redirect', + '400' => 'Bad Request', + '401' => 'Unauthorized', + '402' => 'Payment Required', + '403' => 'Forbidden', + '404' => 'Not Found', + '405' => 'Method Not Allowed', + '406' => 'Not Acceptable', + '407' => 'Proxy Authentication Required', + '408' => 'Request Timeout', + '409' => 'Conflict', + '410' => 'Gone', + '411' => 'Length Required', + '412' => 'Precondition Failed', + '413' => 'Payload Too Large', + '414' => 'URI Too Long', + '415' => 'Unsupported Media Type', + '416' => 'Range Not Satisfiable', + '417' => 'Expectation Failed', + '418' => 'I\'m a teapot', + '419' => 'Session Has Expired', + '421' => 'Misdirected Request', + '422' => 'Unprocessable Entity', + '423' => 'Locked', + '424' => 'Failed Dependency', + '425' => 'Too Early', + '426' => 'Upgrade Required', + '428' => 'Precondition Required', + '429' => 'Too Many Requests', + '431' => 'Request Header Fields Too Large', + '444' => 'Connection Closed Without Response', + '449' => 'Retry With', + '451' => 'Unavailable For Legal Reasons', + '499' => 'Client Closed Request', + '500' => 'Internal Server Error', + '501' => 'Not Implemented', + '502' => 'Bad Gateway', + '503' => 'Maintenance Mode', + '504' => 'Gateway Timeout', + '505' => 'HTTP Version Not Supported', + '506' => 'Variant Also Negotiates', + '507' => 'Insufficient Storage', + '508' => 'Loop Detected', + '509' => 'Bandwidth Limit Exceeded', + '510' => 'Not Extended', + '511' => 'Network Authentication Required', + '520' => 'Unknown Error', + '521' => 'Web Server is Down', + '522' => 'Connection Timed Out', + '523' => 'Origin Is Unreachable', + '524' => 'A Timeout Occurred', + '525' => 'SSL Handshake Failed', + '526' => 'Invalid SSL Certificate', + '527' => 'Railgun Error', + '598' => 'Network Read Timeout Error', + '599' => 'Network Connect Timeout Error', + 'unknownError' => 'Unknown Error', +]; diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php index d481411..f4cedde 100644 --- a/resources/lang/en/pagination.php +++ b/resources/lang/en/pagination.php @@ -1,19 +1,8 @@ 'Next »', 'previous' => '« Previous', - 'next' => 'Next »', - ]; diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php index f1223bd..2d619e9 100644 --- a/resources/lang/en/passwords.php +++ b/resources/lang/en/passwords.php @@ -1,22 +1,11 @@ 'Your password has been reset.', - 'sent' => 'We have emailed your password reset link.', +return [ + 'reset' => 'Your password has been reset!', + 'sent' => 'We have emailed your password reset link!', 'throttled' => 'Please wait before retrying.', - 'token' => 'This password reset token is invalid.', - 'user' => "We can't find a user with that email address.", - + 'token' => 'This password reset token is invalid.', + 'user' => 'We can\'t find a user with that email address.', ]; diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index 4f8f726..c470d1c 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -1,185 +1,217 @@ 'The :attribute field must be accepted.', - 'accepted_if' => 'The :attribute field must be accepted when :other is :value.', - 'active_url' => 'The :attribute field must be a valid URL.', - 'after' => 'The :attribute field must be a date after :date.', - 'after_or_equal' => 'The :attribute field must be a date after or equal to :date.', - 'alpha' => 'The :attribute field must only contain letters.', - 'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.', - 'alpha_num' => 'The :attribute field must only contain letters and numbers.', - 'array' => 'The :attribute field must be an array.', - 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', - 'before' => 'The :attribute field must be a date before :date.', - 'before_or_equal' => 'The :attribute field must be a date before or equal to :date.', - 'between' => [ - 'array' => 'The :attribute field must have between :min and :max items.', - 'file' => 'The :attribute field must be between :min and :max kilobytes.', - 'numeric' => 'The :attribute field must be between :min and :max.', - 'string' => 'The :attribute field must be between :min and :max characters.', +return [ + 'accepted' => 'The :attribute must be accepted.', + 'accepted_if' => 'The :attribute must be accepted when :other is :value.', + 'active_url' => 'The :attribute is not a valid URL.', + 'after' => 'The :attribute must be a date after :date.', + 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', + 'alpha' => 'The :attribute may only contain letters.', + 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', + 'alpha_num' => 'The :attribute may only contain letters and numbers.', + 'array' => 'The :attribute must be an array.', + 'ascii' => 'The :attribute must only contain single-byte alphanumeric characters and symbols.', + 'before' => 'The :attribute must be a date before :date.', + 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', + 'between' => [ + 'array' => 'The :attribute must have between :min and :max items.', + 'file' => 'The :attribute must be between :min and :max kilobytes.', + 'numeric' => 'The :attribute must be between :min and :max.', + 'string' => 'The :attribute must be between :min and :max characters.', ], - 'boolean' => 'The :attribute field must be true or false.', - 'can' => 'The :attribute field contains an unauthorized value.', - 'confirmed' => 'The :attribute field confirmation does not match.', - 'current_password' => 'The password is incorrect.', - 'date' => 'The :attribute field must be a valid date.', - 'date_equals' => 'The :attribute field must be a date equal to :date.', - 'date_format' => 'The :attribute field must match the format :format.', - 'decimal' => 'The :attribute field must have :decimal decimal places.', - 'declined' => 'The :attribute field must be declined.', - 'declined_if' => 'The :attribute field must be declined when :other is :value.', - 'different' => 'The :attribute field and :other must be different.', - 'digits' => 'The :attribute field must be :digits digits.', - 'digits_between' => 'The :attribute field must be between :min and :max digits.', - 'dimensions' => 'The :attribute field has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.', - 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.', - 'email' => 'The :attribute field must be a valid email address.', - 'ends_with' => 'The :attribute field must end with one of the following: :values.', - 'enum' => 'The selected :attribute is invalid.', - 'exists' => 'The selected :attribute is invalid.', - 'file' => 'The :attribute field must be a file.', - 'filled' => 'The :attribute field must have a value.', - 'gt' => [ - 'array' => 'The :attribute field must have more than :value items.', - 'file' => 'The :attribute field must be greater than :value kilobytes.', - 'numeric' => 'The :attribute field must be greater than :value.', - 'string' => 'The :attribute field must be greater than :value characters.', + 'boolean' => 'The :attribute field must be true or false.', + 'can' => 'The :attribute field contains an unauthorized value.', + 'confirmed' => 'The :attribute confirmation does not match.', + 'current_password' => 'The password is incorrect.', + 'date' => 'The :attribute is not a valid date.', + 'date_equals' => 'The :attribute must be a date equal to :date.', + 'date_format' => 'The :attribute does not match the format :format.', + 'decimal' => 'The :attribute must have :decimal decimal places.', + 'declined' => 'The :attribute must be declined.', + 'declined_if' => 'The :attribute must be declined when :other is :value.', + 'different' => 'The :attribute and :other must be different.', + 'digits' => 'The :attribute must be :digits digits.', + 'digits_between' => 'The :attribute must be between :min and :max digits.', + 'dimensions' => 'The :attribute has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'doesnt_end_with' => 'The :attribute may not end with one of the following: :values.', + 'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.', + 'email' => 'The :attribute must be a valid email address.', + 'ends_with' => 'The :attribute must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', + 'exists' => 'The selected :attribute is invalid.', + 'file' => 'The :attribute must be a file.', + 'filled' => 'The :attribute field is required.', + 'gt' => [ + 'array' => 'The :attribute must have more than :value items.', + 'file' => 'The :attribute must be greater than :value kilobytes.', + 'numeric' => 'The :attribute must be greater than :value.', + 'string' => 'The :attribute must be greater than :value characters.', ], - 'gte' => [ - 'array' => 'The :attribute field must have :value items or more.', - 'file' => 'The :attribute field must be greater than or equal to :value kilobytes.', - 'numeric' => 'The :attribute field must be greater than or equal to :value.', - 'string' => 'The :attribute field must be greater than or equal to :value characters.', + 'gte' => [ + 'array' => 'The :attribute must have :value items or more.', + 'file' => 'The :attribute must be greater than or equal :value kilobytes.', + 'numeric' => 'The :attribute must be greater than or equal :value.', + 'string' => 'The :attribute must be greater than or equal :value characters.', ], - 'image' => 'The :attribute field must be an image.', - 'in' => 'The selected :attribute is invalid.', - 'in_array' => 'The :attribute field must exist in :other.', - 'integer' => 'The :attribute field must be an integer.', - 'ip' => 'The :attribute field must be a valid IP address.', - 'ipv4' => 'The :attribute field must be a valid IPv4 address.', - 'ipv6' => 'The :attribute field must be a valid IPv6 address.', - 'json' => 'The :attribute field must be a valid JSON string.', - 'lowercase' => 'The :attribute field must be lowercase.', - 'lt' => [ - 'array' => 'The :attribute field must have less than :value items.', - 'file' => 'The :attribute field must be less than :value kilobytes.', - 'numeric' => 'The :attribute field must be less than :value.', - 'string' => 'The :attribute field must be less than :value characters.', + 'image' => 'The :attribute must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field does not exist in :other.', + 'integer' => 'The :attribute must be an integer.', + 'ip' => 'The :attribute must be a valid IP address.', + 'ipv4' => 'The :attribute must be a valid IPv4 address.', + 'ipv6' => 'The :attribute must be a valid IPv6 address.', + 'json' => 'The :attribute must be a valid JSON string.', + 'lowercase' => 'The :attribute must be lowercase.', + 'lt' => [ + 'array' => 'The :attribute must have less than :value items.', + 'file' => 'The :attribute must be less than :value kilobytes.', + 'numeric' => 'The :attribute must be less than :value.', + 'string' => 'The :attribute must be less than :value characters.', ], - 'lte' => [ - 'array' => 'The :attribute field must not have more than :value items.', - 'file' => 'The :attribute field must be less than or equal to :value kilobytes.', - 'numeric' => 'The :attribute field must be less than or equal to :value.', - 'string' => 'The :attribute field must be less than or equal to :value characters.', + 'lte' => [ + 'array' => 'The :attribute must not have more than :value items.', + 'file' => 'The :attribute must be less than or equal :value kilobytes.', + 'numeric' => 'The :attribute must be less than or equal :value.', + 'string' => 'The :attribute must be less than or equal :value characters.', ], - 'mac_address' => 'The :attribute field must be a valid MAC address.', - 'max' => [ - 'array' => 'The :attribute field must not have more than :max items.', - 'file' => 'The :attribute field must not be greater than :max kilobytes.', - 'numeric' => 'The :attribute field must not be greater than :max.', - 'string' => 'The :attribute field must not be greater than :max characters.', + 'mac_address' => 'The :attribute must be a valid MAC address.', + 'max' => [ + 'array' => 'The :attribute may not have more than :max items.', + 'file' => 'The :attribute may not be greater than :max kilobytes.', + 'numeric' => 'The :attribute may not be greater than :max.', + 'string' => 'The :attribute may not be greater than :max characters.', ], - 'max_digits' => 'The :attribute field must not have more than :max digits.', - 'mimes' => 'The :attribute field must be a file of type: :values.', - 'mimetypes' => 'The :attribute field must be a file of type: :values.', - 'min' => [ - 'array' => 'The :attribute field must have at least :min items.', - 'file' => 'The :attribute field must be at least :min kilobytes.', - 'numeric' => 'The :attribute field must be at least :min.', - 'string' => 'The :attribute field must be at least :min characters.', + 'max_digits' => 'The :attribute must not have more than :max digits.', + 'mimes' => 'The :attribute must be a file of type: :values.', + 'mimetypes' => 'The :attribute must be a file of type: :values.', + 'min' => [ + 'array' => 'The :attribute must have at least :min items.', + 'file' => 'The :attribute must be at least :min kilobytes.', + 'numeric' => 'The :attribute must be at least :min.', + 'string' => 'The :attribute must be at least :min characters.', ], - 'min_digits' => 'The :attribute field must have at least :min digits.', - 'missing' => 'The :attribute field must be missing.', - 'missing_if' => 'The :attribute field must be missing when :other is :value.', - 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', - 'missing_with' => 'The :attribute field must be missing when :values is present.', - 'missing_with_all' => 'The :attribute field must be missing when :values are present.', - 'multiple_of' => 'The :attribute field must be a multiple of :value.', - 'not_in' => 'The selected :attribute is invalid.', - 'not_regex' => 'The :attribute field format is invalid.', - 'numeric' => 'The :attribute field must be a number.', - 'password' => [ - 'letters' => 'The :attribute field must contain at least one letter.', - 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.', - 'numbers' => 'The :attribute field must contain at least one number.', - 'symbols' => 'The :attribute field must contain at least one symbol.', + 'min_digits' => 'The :attribute must have at least :min digits.', + 'missing' => 'The :attribute field must be missing.', + 'missing_if' => 'The :attribute field must be missing when :other is :value.', + 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', + 'missing_with' => 'The :attribute field must be missing when :values is present.', + 'missing_with_all' => 'The :attribute field must be missing when :values are present.', + 'multiple_of' => 'The :attribute must be a multiple of :value.', + 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute format is invalid.', + 'numeric' => 'The :attribute must be a number.', + 'password' => [ + 'letters' => 'The :attribute must contain at least one letter.', + 'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.', + 'numbers' => 'The :attribute must contain at least one number.', + 'symbols' => 'The :attribute must contain at least one symbol.', 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', ], - 'present' => 'The :attribute field must be present.', - 'prohibited' => 'The :attribute field is prohibited.', - 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', - 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', - 'prohibits' => 'The :attribute field prohibits :other from being present.', - 'regex' => 'The :attribute field format is invalid.', - 'required' => 'The :attribute field is required.', - 'required_array_keys' => 'The :attribute field must contain entries for: :values.', - 'required_if' => 'The :attribute field is required when :other is :value.', + 'present' => 'The :attribute field must be present.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'prohibits' => 'The :attribute field prohibits :other from being present.', + 'regex' => 'The :attribute format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', + 'required_if' => 'The :attribute field is required when :other is :value.', 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', - 'required_unless' => 'The :attribute field is required unless :other is in :values.', - 'required_with' => 'The :attribute field is required when :values is present.', - 'required_with_all' => 'The :attribute field is required when :values are present.', - 'required_without' => 'The :attribute field is required when :values is not present.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values is present.', + 'required_without' => 'The :attribute field is required when :values is not present.', 'required_without_all' => 'The :attribute field is required when none of :values are present.', - 'same' => 'The :attribute field must match :other.', - 'size' => [ - 'array' => 'The :attribute field must contain :size items.', - 'file' => 'The :attribute field must be :size kilobytes.', - 'numeric' => 'The :attribute field must be :size.', - 'string' => 'The :attribute field must be :size characters.', + 'same' => 'The :attribute and :other must match.', + 'size' => [ + 'array' => 'The :attribute must contain :size items.', + 'file' => 'The :attribute must be :size kilobytes.', + 'numeric' => 'The :attribute must be :size.', + 'string' => 'The :attribute must be :size characters.', ], - 'starts_with' => 'The :attribute field must start with one of the following: :values.', - 'string' => 'The :attribute field must be a string.', - 'timezone' => 'The :attribute field must be a valid timezone.', - 'unique' => 'The :attribute has already been taken.', - 'uploaded' => 'The :attribute failed to upload.', - 'uppercase' => 'The :attribute field must be uppercase.', - 'url' => 'The :attribute field must be a valid URL.', - 'ulid' => 'The :attribute field must be a valid ULID.', - 'uuid' => 'The :attribute field must be a valid UUID.', - - /* - |-------------------------------------------------------------------------- - | 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', - ], + 'starts_with' => 'The :attribute must start with one of the following: :values', + 'string' => 'The :attribute must be a string.', + 'timezone' => 'The :attribute must be a valid zone.', + 'ulid' => 'The :attribute must be a valid ULID.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'uppercase' => 'The :attribute must be uppercase.', + 'url' => 'The :attribute format is invalid.', + 'uuid' => 'The :attribute must be a valid UUID.', + 'attributes' => [ + 'address' => 'address', + 'age' => 'age', + 'amount' => 'amount', + 'area' => 'area', + 'available' => 'available', + 'birthday' => 'birthday', + 'body' => 'body', + 'city' => 'city', + 'content' => 'content', + 'country' => 'country', + 'created_at' => 'created at', + 'creator' => 'creator', + 'current_password' => 'current password', + 'date' => 'date', + 'date_of_birth' => 'date of birth', + 'day' => 'day', + 'deleted_at' => 'deleted at', + 'description' => 'description', + 'district' => 'district', + 'duration' => 'duration', + 'email' => 'email', + 'excerpt' => 'excerpt', + 'filter' => 'filter', + 'first_name' => 'first name', + 'gender' => 'gender', + 'group' => 'group', + 'hour' => 'hour', + 'image' => 'image', + 'last_name' => 'last name', + 'lesson' => 'lesson', + 'line_address_1' => 'line address 1', + 'line_address_2' => 'line address 2', + 'message' => 'message', + 'middle_name' => 'middle name', + 'minute' => 'minute', + 'mobile' => 'mobile', + 'month' => 'month', + 'name' => 'name', + 'national_code' => 'national code', + 'number' => 'number', + 'password' => 'password', + 'password_confirmation' => 'password confirmation', + 'phone' => 'phone', + 'photo' => 'photo', + 'postal_code' => 'postal code', + 'price' => 'price', + 'province' => 'province', + 'recaptcha_response_field' => 'recaptcha response field', + 'remember' => 'remember', + 'restored_at' => 'restored at', + 'result_text_under_image' => 'result text under image', + 'role' => 'role', + 'second' => 'second', + 'sex' => 'sex', + 'short_text' => 'short text', + 'size' => 'size', + 'state' => 'state', + 'street' => 'street', + 'student' => 'student', + 'subject' => 'subject', + 'teacher' => 'teacher', + 'terms' => 'terms', + 'test_description' => 'test description', + 'test_locale' => 'test locale', + 'test_name' => 'test name', + 'text' => 'text', + 'time' => 'time', + 'title' => 'title', + 'updated_at' => 'updated at', + 'username' => 'username', + 'year' => 'year', ], - - /* - |-------------------------------------------------------------------------- - | 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' => [], - ]; diff --git a/resources/lang/es.json b/resources/lang/es.json index 2e8a80e..79c15f4 100644 --- a/resources/lang/es.json +++ b/resources/lang/es.json @@ -1,33 +1,55 @@ { + "(and :count more error)": "(y :count error más)", + "(and :count more errors)": "(y :count errores más)", + "A fresh verification link has been sent to your email address.": "Se ha enviado un nuevo enlace de verificación a tu correo electrónico.", + "All rights reserved.": "Todos los derechos reservados.", + "Before proceeding, please check your email for a verification link.": "Antes de poder continuar, por favor, confirma tu correo electrónico con el enlace que te hemos enviado.", + "click here to request another": "pulsa aquí para que te enviemos otro", + "Confirm Password": "Confirmar contraseña", "E-Mail Address": "Correo electrónico", - "Password": "Contraseña", - "Remember Me": "Recuérdame", - "Login": "Acceder", + "Forbidden": "Prohibido", "Forgot Your Password?": "¿Olvidaste tu contraseña?", - "Register": "Registro", - "Name": "Nombre", - "Confirm Password": "Confirmar contraseña", - "Reset Password": "Restablecer contraseña", - "Reset Password Notification": "Aviso para restablecer contraseña", - "You are receiving this email because we received a password reset request for your account.": "Estás recibiendo este email porque se ha solicitado un cambio de contraseña para tu cuenta.", - "This password reset link will expire in :count minutes.": "Este enlace para restablecer la contraseña caduca en :count minutos.", - "If you did not request a password reset, no further action is required.": "Si no has solicitado un cambio de contraseña, puedes ignorar o eliminar este e-mail.", - "Please confirm your password before continuing.": "Por favor confirme su contraseña antes de continuar.", - "Regards": "Saludos", - "Whoops!": "¡Ups!", + "Go to page :page": "Ir a la página :page", "Hello!": "¡Hola!", + "If you did not create an account, no further action is required.": "Si no ha creado una cuenta, no se requiere ninguna acción adicional.", + "If you did not receive the email": "Si no has recibido el email", + "If you did not request a password reset, no further action is required.": "Si no ha solicitado el restablecimiento de contraseña, omita este mensaje de correo electrónico.", + "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si está teniendo problemas al hacer clic en el botón \":actionText\", copie y pegue la URL de abajo\nen su navegador web:", + "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si tienes problemas haciendo click en el botón \":actionText\", copia y pega el siguiente\nenlace en tu navegador:", "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser: [:actionURL](:actionURL)": "Si tienes problemas haciendo click en el botón \":actionText\", copia y pega el siguiente\nenlace en tu navegador: [:actionURL](:actionURL)", "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser: [:displayableActionUrl](:actionURL)": "Si tienes problemas haciendo click en el botón \":actionText\", copia y pega el siguiente\nenlace en tu navegador: [:displayableActionUrl](:actionURL)", - "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si tienes problemas haciendo click en el botón \":actionText\", copia y pega el siguiente\nenlace en tu navegador:", + "Invalid JSON was returned from the route.": "Se devolvió un JSON no válido desde la ruta.", + "Login": "Iniciar sesión", + "Logout": "Finalizar sesión", + "Name": "Nombre", + "Not Found": "No encontrado", + "of": "de", + "Page Expired": "Página expirada", + "Pagination Navigation": "Navegación por los enlaces de paginación", + "Password": "Contraseña", + "Payment Required": "Pago requerido", + "Please click the button below to verify your email address.": "Por favor, haga clic en el botón de abajo para verificar su dirección de correo electrónico.", + "Please confirm your password before continuing.": "Por favor confirme su contraseña antes de continuar.", + "Regards": "Saludos", + "Register": "Registrarse", + "Remember Me": "Recuérdame", + "Reset Password": "Restablecer contraseña", + "Reset Password Notification": "Notificación de restablecimiento de contraseña", + "results": "resultados", "Send Password Reset Link": "Enviar enlace para restablecer contraseña", - "Logout": "Cerrar sesión", - "Verify Email Address": "Confirmar correo electrónico", - "Please click the button below to verify your email address.": "Por favor pulsa el siguiente botón para confirmar tu correo electrónico.", - "If you did not create an account, no further action is required.": "Si no has creado ninguna cuenta, puedes ignorar o eliminar este e-mail.", + "Server Error": "Error del servidor", + "Service Unavailable": "Servicio no disponible", + "Showing": "Mostrando", + "The given data was invalid.": "Los datos proporcionados no son válidos.", + "The response is not a streamed response.": "La respuesta no es una respuesta transmitida.", + "The response is not a view.": "La respuesta no es una vista.", + "This password reset link will expire in :count minutes.": "Este enlace de restablecimiento de contraseña expirará en :count minutos.", + "to": "al", + "Toggle navigation": "Alternar navegación", + "Too Many Requests": "Demasiadas peticiones", + "Unauthorized": "No autorizado", + "Verify Email Address": "Confirme su correo electrónico", "Verify Your Email Address": "Confirma tu correo electrónico", - "A fresh verification link has been sent to your email address.": "Se ha enviado un nuevo enlace de verificación a tu correo electrónico.", - "Before proceeding, please check your email for a verification link.": "Antes de poder continuar, por favor, confirma tu correo electrónico con el enlace que te hemos enviado.", - "If you did not receive the email": "Si no has recibido el email", - "click here to request another": "pulsa aquí para que te enviemos otro", - "All rights reserved.": "Todos los derechos reservados." -} + "Whoops!": "¡Ups!", + "You are receiving this email because we received a password reset request for your account.": "Ha recibido este mensaje porque se solicitó un restablecimiento de contraseña para su cuenta." +} \ No newline at end of file diff --git a/resources/lang/es/app.php b/resources/lang/es/app.php index b34a430..feba5e3 100644 --- a/resources/lang/es/app.php +++ b/resources/lang/es/app.php @@ -1,4 +1,9 @@ 'Aplicación Multi-Idioma', + 'name' => 'Aplicación Multi-Idioma', + 'select_locale' => 'Selecciona tu idioma', + 'example' => 'Ejemplo:', + 'articles' => 'Artículos', + 'title' => 'Título', + 'content' => 'Contenido', ]; \ No newline at end of file diff --git a/resources/lang/es/auth.php b/resources/lang/es/auth.php index 3c5fd5e..888279b 100644 --- a/resources/lang/es/auth.php +++ b/resources/lang/es/auth.php @@ -1,19 +1,9 @@ 'Estas credenciales no coinciden con nuestros registros.', - 'throttle' => 'Demasiados intentos de acceso. Por favor inténtelo de nuevo en :seconds segundos.', +declare(strict_types=1); +return [ + 'failed' => 'Estas credenciales no coinciden con nuestros registros.', + 'password' => 'La contraseña es incorrecta.', + 'throttle' => 'Demasiados intentos de acceso. Por favor intente nuevamente en :seconds segundos.', ]; diff --git a/resources/lang/es/http-statuses.php b/resources/lang/es/http-statuses.php new file mode 100644 index 0000000..5faef55 --- /dev/null +++ b/resources/lang/es/http-statuses.php @@ -0,0 +1,84 @@ + 'Error desconocido', + '100' => 'Continuar', + '101' => 'Protocolos de conmutación', + '102' => 'Procesando', + '200' => 'OK', + '201' => 'Creado', + '202' => 'Aceptado', + '203' => 'Información no autorizada', + '204' => 'Sin contenido', + '205' => 'Restablecer contenido', + '206' => 'Contenido parcial', + '207' => 'Multiestado', + '208' => 'Ya Reportado', + '226' => 'Estoy usado', + '300' => 'Múltiples opciones', + '301' => 'Movido permanentemente', + '302' => 'Encontrado', + '303' => 'Ver otros', + '304' => 'No modificado', + '305' => 'Usa proxy', + '307' => 'Redirección temporal', + '308' => 'Redirección permanente', + '400' => 'Solicitud incorrecta', + '401' => 'No autorizado', + '402' => 'Pago requerido', + '403' => 'Prohibido', + '404' => 'No encontrado', + '405' => 'Método no permitido', + '406' => 'Inaceptable', + '407' => 'Se requiere autenticación proxy', + '408' => 'Solicitud de tiempo de espera', + '409' => 'Conflicto', + '410' => 'Recurso no disponible', + '411' => 'Longitud requerida', + '412' => 'Error de condición previa', + '413' => 'Solicitud demasiado grande', + '414' => 'URI demasiado largo', + '415' => 'Tipo de medio no admitido', + '416' => 'Rango no satisfactorio', + '417' => 'Expectativa fallida', + '418' => 'Soy una tetera', + '419' => 'La sesión ha expirado', + '421' => 'Solicitud mal dirigida', + '422' => 'Entidad no procesable', + '423' => 'Bloqueado', + '424' => 'Dependencia fallida', + '425' => 'Demasiado temprano', + '426' => 'Se requiere actualización', + '428' => 'Precondición requerida', + '429' => 'Demasiadas solicitudes', + '431' => 'Campos de encabezado de solicitud demasiado grandes', + '444' => 'Conexión cerrada sin respuesta', + '449' => 'Reintentar con', + '451' => 'No disponible por razones legales', + '499' => 'Solicitud cerrada del cliente', + '500' => 'Error interno del servidor', + '501' => 'No se ha implementado', + '502' => 'Mala puerta de enlace', + '503' => 'Modo de mantenimiento', + '504' => 'Tiempo de espera de puerta de enlace', + '505' => 'Versión HTTP no compatible', + '506' => 'Variante También Negocia', + '507' => 'Espacio insuficiente', + '508' => 'Bucle detectado', + '509' => 'Límite de ancho de banda excedido', + '510' => 'no extendido', + '511' => 'Se requiere autenticación de red', + '520' => 'Error desconocido', + '521' => 'El servidor web está caído', + '522' => 'Tiempo de conexión agotado', + '523' => 'El origen es inalcanzable', + '524' => 'Se produjo un tiempo de espera', + '525' => 'Protocolo de enlace SSL fallido', + '526' => 'Certificado SSL no válido', + '527' => 'Error de cañón de riel', + '598' => 'Error de tiempo de espera de lectura de red', + '599' => 'Error de tiempo de espera de conexión de red', + 'unknownError' => 'Error desconocido', +]; diff --git a/resources/lang/es/pagination.php b/resources/lang/es/pagination.php index 325916d..03816a3 100644 --- a/resources/lang/es/pagination.php +++ b/resources/lang/es/pagination.php @@ -1,19 +1,8 @@ '« Anterior', +return [ 'next' => 'Siguiente »', - + 'previous' => '« Anterior', ]; diff --git a/resources/lang/es/passwords.php b/resources/lang/es/passwords.php index 61fee72..6f9c0c2 100644 --- a/resources/lang/es/passwords.php +++ b/resources/lang/es/passwords.php @@ -1,22 +1,12 @@ '¡Su contraseña ha sido restablecida!', - 'sent' => '¡Recordatorio de contraseña enviado!', - 'token' => 'Este token de restablecimiento de contraseña es inválido.', - 'user' => 'No se ha encontrado un usuario con esa dirección de correo.', - 'throttled' => 'Por favor espere antes de volver a intentarlo.', - 'password' => 'Las contraseñas deben tener al menos seis caracteres y coincidir con la confirmación.' +return [ + 'password' => 'Las contraseñas deben tener al menos seis caracteres y coincidir con la confirmación.', + 'reset' => 'Su contraseña ha sido restablecida.', + 'sent' => 'Le hemos enviado por correo electrónico el enlace para restablecer su contraseña.', + 'throttled' => 'Por favor espere antes de intentar de nuevo.', + 'token' => 'El token de restablecimiento de contraseña es inválido.', + 'user' => 'No encontramos ningún usuario con ese correo electrónico.', ]; diff --git a/resources/lang/es/validation.php b/resources/lang/es/validation.php index ef444d3..0097477 100644 --- a/resources/lang/es/validation.php +++ b/resources/lang/es/validation.php @@ -1,151 +1,217 @@ 'El campo :attribute debe ser aceptado.', - 'active_url' => 'El campo :attribute no es una URL válida.', + 'accepted_if' => 'El campo :attribute debe ser aceptado cuando :other sea :value.', + 'active_url' => 'El campo :attribute debe ser una URL válida.', 'after' => 'El campo :attribute debe ser una fecha posterior a :date.', 'after_or_equal' => 'El campo :attribute debe ser una fecha posterior o igual a :date.', - 'alpha' => 'El campo :attribute solo puede contener letras.', - 'alpha_dash' => 'El campo :attribute solo puede contener letras, números, guiones y guiones bajos.', - 'alpha_num' => 'El campo :attribute solo puede contener letras y números.', - 'array' => 'El campo :attribute debe ser un array.', + 'alpha' => 'El campo :attribute sólo debe contener letras.', + 'alpha_dash' => 'El campo :attribute sólo debe contener letras, números, guiones y guiones bajos.', + 'alpha_num' => 'El campo :attribute sólo debe contener letras y números.', + 'array' => 'El campo :attribute debe ser un conjunto.', + 'ascii' => 'El campo :attribute solo debe contener caracteres alfanuméricos y símbolos de un solo byte.', 'before' => 'El campo :attribute debe ser una fecha anterior a :date.', 'before_or_equal' => 'El campo :attribute debe ser una fecha anterior o igual a :date.', 'between' => [ - 'numeric' => 'El campo :attribute debe ser un valor entre :min y :max.', - 'file' => 'El archivo :attribute debe pesar entre :min y :max kilobytes.', - 'string' => 'El campo :attribute debe contener entre :min y :max caracteres.', - 'array' => 'El campo :attribute debe contener entre :min y :max elementos.', + 'array' => 'El campo :attribute tiene que tener entre :min - :max elementos.', + 'file' => 'El campo :attribute debe pesar entre :min - :max kilobytes.', + 'numeric' => 'El campo :attribute tiene que estar entre :min - :max.', + 'string' => 'El campo :attribute tiene que tener entre :min - :max caracteres.', ], - 'boolean' => 'El campo :attribute debe ser verdadero o falso.', - 'confirmed' => 'El campo confirmación de :attribute no coincide.', - 'date' => 'El campo :attribute no corresponde con una fecha válida.', + 'boolean' => 'El campo :attribute debe tener un valor verdadero o falso.', + 'can' => 'El campo :attribute contiene un valor no autorizado.', + 'confirmed' => 'La confirmación de :attribute no coincide.', + 'current_password' => 'La contraseña es incorrecta.', + 'date' => 'El campo :attribute debe ser una fecha válida.', 'date_equals' => 'El campo :attribute debe ser una fecha igual a :date.', - 'date_format' => 'El campo :attribute no corresponde con el formato de fecha :format.', - 'different' => 'Los campos :attribute y :other deben ser diferentes.', - 'digits' => 'El campo :attribute debe ser un número de :digits dígitos.', - 'digits_between' => 'El campo :attribute debe contener entre :min y :max dígitos.', - 'dimensions' => 'El campo :attribute tiene dimensiones de imagen inválidas.', - 'distinct' => 'El campo :attribute tiene un valor duplicado.', - 'email' => 'El campo :attribute debe ser una dirección de correo válida.', - 'ends_with' => 'El campo :attribute debe finalizar con alguno de los siguientes valores: :values', - 'exists' => 'El campo :attribute seleccionado no existe.', + 'date_format' => 'El campo :attribute debe coincidir con el formato :format.', + 'decimal' => 'El campo :attribute debe tener :decimal cifras decimales.', + 'declined' => 'El campo :attribute debe ser rechazado.', + 'declined_if' => 'El campo :attribute debe ser rechazado cuando :other sea :value.', + 'different' => 'El campo :attribute y :other deben ser diferentes.', + 'digits' => 'El campo :attribute debe tener :digits dígitos.', + 'digits_between' => 'El campo :attribute debe tener entre :min y :max dígitos.', + 'dimensions' => 'El campo :attribute tiene dimensiones de imagen no válidas.', + 'distinct' => 'El campo :attribute contiene un valor duplicado.', + 'doesnt_end_with' => 'El campo :attribute no debe finalizar con uno de los siguientes: :values.', + 'doesnt_start_with' => 'El campo :attribute no debe comenzar con uno de los siguientes: :values.', + 'email' => 'El campo :attribute no es un correo válido.', + 'ends_with' => 'El campo :attribute debe finalizar con uno de los siguientes valores: :values', + 'enum' => 'El :attribute seleccionado es inválido.', + 'exists' => 'El :attribute seleccionado es inválido.', 'file' => 'El campo :attribute debe ser un archivo.', - 'filled' => 'El campo :attribute debe tener un valor.', + 'filled' => 'El campo :attribute es obligatorio.', 'gt' => [ - 'numeric' => 'El campo :attribute debe ser mayor a :value.', - 'file' => 'El archivo :attribute debe pesar más de :value kilobytes.', - 'string' => 'El campo :attribute debe contener más de :value caracteres.', - 'array' => 'El campo :attribute debe contener más de :value elementos.', + 'array' => 'El campo :attribute debe tener más de :value elementos.', + 'file' => 'El campo :attribute debe tener más de :value kilobytes.', + 'numeric' => 'El campo :attribute debe ser mayor que :value.', + 'string' => 'El campo :attribute debe tener más de :value caracteres.', ], 'gte' => [ - 'numeric' => 'El campo :attribute debe ser mayor o igual a :value.', - 'file' => 'El archivo :attribute debe pesar :value o más kilobytes.', - 'string' => 'El campo :attribute debe contener :value o más caracteres.', - 'array' => 'El campo :attribute debe contener :value o más elementos.', + 'array' => 'El campo :attribute debe tener como mínimo :value elementos.', + 'file' => 'El campo :attribute debe tener como mínimo :value kilobytes.', + 'numeric' => 'El campo :attribute debe ser como mínimo :value.', + 'string' => 'El campo :attribute debe tener como mínimo :value caracteres.', ], 'image' => 'El campo :attribute debe ser una imagen.', - 'in' => 'El campo :attribute es inválido.', - 'in_array' => 'El campo :attribute no existe en :other.', + 'in' => 'El :attribute seleccionado no es válido.', + 'in_array' => 'El campo :attribute debe existir en :other.', 'integer' => 'El campo :attribute debe ser un número entero.', 'ip' => 'El campo :attribute debe ser una dirección IP válida.', 'ipv4' => 'El campo :attribute debe ser una dirección IPv4 válida.', 'ipv6' => 'El campo :attribute debe ser una dirección IPv6 válida.', - 'json' => 'El campo :attribute debe ser una cadena de texto JSON válida.', + 'json' => 'El campo :attribute debe ser una cadena JSON válida.', + 'lowercase' => 'El campo :attribute debe estar en minúscula.', 'lt' => [ - 'numeric' => 'El campo :attribute debe ser menor a :value.', - 'file' => 'El archivo :attribute debe pesar menos de :value kilobytes.', - 'string' => 'El campo :attribute debe contener menos de :value caracteres.', - 'array' => 'El campo :attribute debe contener menos de :value elementos.', + 'array' => 'El campo :attribute debe tener menos de :value elementos.', + 'file' => 'El campo :attribute debe tener menos de :value kilobytes.', + 'numeric' => 'El campo :attribute debe ser menor que :value.', + 'string' => 'El campo :attribute debe tener menos de :value caracteres.', ], 'lte' => [ - 'numeric' => 'El campo :attribute debe ser menor o igual a :value.', - 'file' => 'El archivo :attribute debe pesar :value o menos kilobytes.', - 'string' => 'El campo :attribute debe contener :value o menos caracteres.', - 'array' => 'El campo :attribute debe contener :value o menos elementos.', + 'array' => 'El campo :attribute debe tener como máximo :value elementos.', + 'file' => 'El campo :attribute debe tener como máximo :value kilobytes.', + 'numeric' => 'El campo :attribute debe ser como máximo :value.', + 'string' => 'El campo :attribute debe tener como máximo :value caracteres.', ], + 'mac_address' => 'El campo :attribute debe ser una dirección MAC válida.', 'max' => [ - 'numeric' => 'El campo :attribute no debe ser mayor a :max.', - 'file' => 'El archivo :attribute no debe pesar más de :max kilobytes.', - 'string' => 'El campo :attribute no debe contener más de :max caracteres.', - 'array' => 'El campo :attribute no debe contener más de :max elementos.', + 'array' => 'El campo :attribute no debe tener más de :max elementos.', + 'file' => 'El campo :attribute no debe ser mayor que :max kilobytes.', + 'numeric' => 'El campo :attribute no debe ser mayor que :max.', + 'string' => 'El campo :attribute no debe ser mayor que :max caracteres.', ], - 'mimes' => 'El campo :attribute debe ser un archivo de tipo: :values.', - 'mimetypes' => 'El campo :attribute debe ser un archivo de tipo: :values.', + 'max_digits' => 'El campo :attribute no debe tener más de :max dígitos.', + 'mimes' => 'El campo :attribute debe ser un archivo con formato: :values.', + 'mimetypes' => 'El campo :attribute debe ser un archivo con formato: :values.', 'min' => [ - 'numeric' => 'El campo :attribute debe ser al menos :min.', - 'file' => 'El archivo :attribute debe pesar al menos :min kilobytes.', + 'array' => 'El campo :attribute debe tener al menos :min elementos.', + 'file' => 'El tamaño de :attribute debe ser de al menos :min kilobytes.', + 'numeric' => 'El tamaño de :attribute debe ser de al menos :min.', 'string' => 'El campo :attribute debe contener al menos :min caracteres.', - 'array' => 'El campo :attribute debe contener al menos :min elementos.', ], - 'not_in' => 'El campo :attribute seleccionado es inválido.', - 'not_regex' => 'El formato del campo :attribute es inválido.', - 'numeric' => 'El campo :attribute debe ser un número.', - 'password' => 'La contraseña es incorrecta.', + 'min_digits' => 'El campo :attribute debe tener al menos :min dígitos.', + 'missing' => 'El campo :attribute no debe estar presente.', + 'missing_if' => 'El campo :attribute no debe estar presente cuando :other sea :value.', + 'missing_unless' => 'El campo :attribute no debe estar presente a menos que :other sea :value.', + 'missing_with' => 'El campo :attribute no debe estar presente si alguno de los campos :values está presente.', + 'missing_with_all' => 'El campo :attribute no debe estar presente cuando los campos :values estén presentes.', + 'multiple_of' => 'El campo :attribute debe ser múltiplo de :value', + 'not_in' => 'El :attribute seleccionado no es válido.', + 'not_regex' => 'El formato del campo :attribute no es válido.', + 'numeric' => 'El campo :attribute debe ser numérico.', + 'password' => [ + 'letters' => 'La :attribute debe contener al menos una letra.', + 'mixed' => 'La :attribute debe contener al menos una letra mayúscula y una minúscula.', + 'numbers' => 'La :attribute debe contener al menos un número.', + 'symbols' => 'La :attribute debe contener al menos un símbolo.', + 'uncompromised' => 'La :attribute proporcionada se ha visto comprometida en una filtración de datos (data leak). Elija una :attribute diferente.', + ], 'present' => 'El campo :attribute debe estar presente.', - 'regex' => 'El formato del campo :attribute es inválido.', + 'prohibited' => 'El campo :attribute está prohibido.', + 'prohibited_if' => 'El campo :attribute está prohibido cuando :other es :value.', + 'prohibited_unless' => 'El campo :attribute está prohibido a menos que :other sea :values.', + 'prohibits' => 'El campo :attribute prohibe que :other esté presente.', + 'regex' => 'El formato del campo :attribute no es válido.', 'required' => 'El campo :attribute es obligatorio.', - 'required_if' => 'El campo :attribute es obligatorio cuando el campo :other es :value.', - 'required_unless' => 'El campo :attribute es requerido a menos que :other se encuentre en :values.', + 'required_array_keys' => 'El campo :attribute debe contener entradas para: :values.', + 'required_if' => 'El campo :attribute es obligatorio cuando :other es :value.', + 'required_if_accepted' => 'El campo :attribute es obligatorio si :other es aceptado.', + 'required_unless' => 'El campo :attribute es obligatorio a menos que :other esté en :values.', 'required_with' => 'El campo :attribute es obligatorio cuando :values está presente.', 'required_with_all' => 'El campo :attribute es obligatorio cuando :values están presentes.', 'required_without' => 'El campo :attribute es obligatorio cuando :values no está presente.', - 'required_without_all' => 'El campo :attribute es obligatorio cuando ninguno de los campos :values están presentes.', + 'required_without_all' => 'El campo :attribute es obligatorio cuando ninguno de :values está presente.', 'same' => 'Los campos :attribute y :other deben coincidir.', 'size' => [ - 'numeric' => 'El campo :attribute debe ser :size.', - 'file' => 'El archivo :attribute debe pesar :size kilobytes.', - 'string' => 'El campo :attribute debe contener :size caracteres.', 'array' => 'El campo :attribute debe contener :size elementos.', + 'file' => 'El tamaño de :attribute debe ser :size kilobytes.', + 'numeric' => 'El tamaño de :attribute debe ser :size.', + 'string' => 'El campo :attribute debe contener :size caracteres.', ], 'starts_with' => 'El campo :attribute debe comenzar con uno de los siguientes valores: :values', 'string' => 'El campo :attribute debe ser una cadena de caracteres.', 'timezone' => 'El campo :attribute debe ser una zona horaria válida.', - 'unique' => 'El valor del campo :attribute ya está en uso.', - 'uploaded' => 'El campo :attribute no se pudo subir.', - 'url' => 'El formato del campo :attribute es inválido.', + 'ulid' => 'El campo :attribute debe ser un ULID válido.', + 'unique' => 'El campo :attribute ya ha sido registrado.', + 'uploaded' => 'Subir :attribute ha fallado.', + 'uppercase' => 'El campo :attribute debe estar en mayúscula.', + 'url' => 'El campo :attribute debe ser una URL válida.', 'uuid' => 'El campo :attribute debe ser un UUID válido.', - - /* - |-------------------------------------------------------------------------- - | 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', - ], + 'attributes' => [ + 'address' => 'dirección', + 'age' => 'edad', + 'amount' => 'cantidad', + 'area' => 'área', + 'available' => 'disponible', + 'birthday' => 'cumpleaños', + 'body' => 'contenido', + 'city' => 'ciudad', + 'content' => 'contenido', + 'country' => 'país', + 'created_at' => 'creado el', + 'creator' => 'creador', + 'current_password' => 'contraseña actual', + 'date' => 'fecha', + 'date_of_birth' => 'fecha de nacimiento', + 'day' => 'día', + 'deleted_at' => 'eliminado el', + 'description' => 'descripción', + 'district' => 'distrito', + 'duration' => 'duración', + 'email' => 'correo electrónico', + 'excerpt' => 'extracto', + 'filter' => 'filtro', + 'first_name' => 'nombre', + 'gender' => 'género', + 'group' => 'grupo', + 'hour' => 'hora', + 'image' => 'imagen', + 'last_name' => 'apellido', + 'lesson' => 'lección', + 'line_address_1' => 'dirección de la línea 1', + 'line_address_2' => 'dirección de la línea 2', + 'message' => 'mensaje', + 'middle_name' => 'segundo nombre', + 'minute' => 'minuto', + 'mobile' => 'móvil', + 'month' => 'mes', + 'name' => 'nombre', + 'national_code' => 'código nacional', + 'number' => 'número', + 'password' => 'contraseña', + 'password_confirmation' => 'confirmación de la contraseña', + 'phone' => 'teléfono', + 'photo' => 'foto', + 'postal_code' => 'código postal', + 'price' => 'precio', + 'province' => 'provincia', + 'recaptcha_response_field' => 'respuesta del recaptcha', + 'remember' => 'recordar', + 'restored_at' => 'restaurado el', + 'result_text_under_image' => 'texto bajo la imagen', + 'role' => 'rol', + 'second' => 'segundo', + 'sex' => 'sexo', + 'short_text' => 'texto corto', + 'size' => 'tamaño', + 'state' => 'estado', + 'street' => 'calle', + 'student' => 'estudiante', + 'subject' => 'asunto', + 'teacher' => 'profesor', + 'terms' => 'términos', + 'test_description' => 'descripción de prueba', + 'test_locale' => 'prueba local', + 'test_name' => 'nombre de prueba', + 'text' => 'texto', + 'time' => 'hora', + 'title' => 'título', + 'updated_at' => 'actualizado el', + 'username' => 'usuario', + 'year' => 'año', ], - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. - | - */ - - 'attributes' => [], - ]; diff --git a/resources/lang/fr.json b/resources/lang/fr.json new file mode 100644 index 0000000..db9f718 --- /dev/null +++ b/resources/lang/fr.json @@ -0,0 +1,39 @@ +{ + "(and :count more error)": "(et :count erreur en plus)", + "(and :count more errors)": "(et :count erreurs en plus)", + "All rights reserved.": "Tous droits réservés.", + "Forbidden": "Interdit", + "Go to page :page": "Aller à la page :page", + "Hello!": "Bonjour !", + "If you did not create an account, no further action is required.": "Si vous n'avez pas créé de compte, vous pouvez ignorer ce message.", + "If you did not request a password reset, no further action is required.": "Si vous n'avez pas demandé de réinitialisation de mot de passe, vous pouvez ignorer ce message.", + "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si vous avez des difficultés à cliquer sur le bouton \":actionText\", copiez et collez l'URL ci-dessous\ndans votre navigateur Web :", + "Invalid JSON was returned from the route.": "Un JSON non valide a été renvoyé par la route.", + "Login": "Connexion", + "Logout": "Déconnexion", + "Not Found": "Non trouvé", + "of": "de", + "Page Expired": "Page expirée", + "Pagination Navigation": "Pagination", + "Payment Required": "Paiement requis", + "Please click the button below to verify your email address.": "Veuillez cliquer sur le bouton ci-dessous pour vérifier votre adresse e-mail :", + "Regards": "Cordialement", + "Register": "Inscription", + "Reset Password": "Réinitialisation du mot de passe", + "Reset Password Notification": "Notification de réinitialisation du mot de passe", + "results": "résultats", + "Server Error": "Erreur serveur", + "Service Unavailable": "Service indisponible", + "Showing": "Montrant", + "The given data was invalid.": "La donnée renseignée est incorrecte.", + "The response is not a streamed response.": "La réponse n'est pas une réponse diffusée.", + "The response is not a view.": "La réponse n'est pas une vue.", + "This password reset link will expire in :count minutes.": "Ce lien de réinitialisation du mot de passe expirera dans :count minutes.", + "to": "à", + "Toggle navigation": "Afficher / masquer le menu de navigation", + "Too Many Requests": "Trop de requêtes", + "Unauthorized": "Non autorisé", + "Verify Email Address": "Vérifier l'adresse e-mail", + "Whoops!": "Oups !", + "You are receiving this email because we received a password reset request for your account.": "Vous recevez cet e-mail car nous avons reçu une demande de réinitialisation de mot de passe pour votre compte." +} \ No newline at end of file diff --git a/resources/lang/fr/auth.php b/resources/lang/fr/auth.php new file mode 100644 index 0000000..a22cd3f --- /dev/null +++ b/resources/lang/fr/auth.php @@ -0,0 +1,9 @@ + 'Ces identifiants ne correspondent pas à nos enregistrements.', + 'password' => 'Le mot de passe est incorrect', + 'throttle' => 'Tentatives de connexion trop nombreuses. Veuillez essayer de nouveau dans :seconds secondes.', +]; diff --git a/resources/lang/fr/http-statuses.php b/resources/lang/fr/http-statuses.php new file mode 100644 index 0000000..af44920 --- /dev/null +++ b/resources/lang/fr/http-statuses.php @@ -0,0 +1,84 @@ + 'Erreur inconnue', + '100' => 'Continuer', + '101' => 'Protocoles de commutation', + '102' => 'En traitement', + '200' => 'D\'accord', + '201' => 'Créé', + '202' => 'Accepté', + '203' => 'Informations non autorisées', + '204' => 'Pas content', + '205' => 'Réinitialiser le contenu', + '206' => 'Contenu partiel', + '207' => 'Multi-statut', + '208' => 'Déjà rapporté', + '226' => 'J\'ai l\'habitude', + '300' => 'Choix multiples', + '301' => 'Déplacé de façon permanente', + '302' => 'A trouvé', + '303' => 'Voir autre', + '304' => 'Non modifié', + '305' => 'Utiliser un proxy', + '307' => 'Redirection temporaire', + '308' => 'Redirection permanente', + '400' => 'Mauvaise Demande', + '401' => 'Non autorisé', + '402' => 'Paiement Requis', + '403' => 'Interdit', + '404' => 'Page non trouvée', + '405' => 'Méthode Non Autorisée', + '406' => 'Pas acceptable', + '407' => 'Authentification proxy requise', + '408' => 'Délai d\'expiration de la demande', + '409' => 'Conflit', + '410' => 'Disparu', + '411' => 'Longueur requise', + '412' => 'La précondition a échoué', + '413' => 'Charge utile trop grande', + '414' => 'URI trop long', + '415' => 'Type de support non supporté', + '416' => 'Plage non satisfaisante', + '417' => 'Échec de l\'attente', + '418' => 'Je suis une théière', + '419' => 'La session a expiré', + '421' => 'Demande mal dirigée', + '422' => 'Entité non traitable', + '423' => 'Fermé à clef', + '424' => 'Dépendance échouée', + '425' => 'Trop tôt', + '426' => 'Mise à niveau requise', + '428' => 'Condition préalable requise', + '429' => 'Trop de demandes', + '431' => 'Demander des champs d\'en-tête trop grands', + '444' => 'Connexion fermée sans réponse', + '449' => 'Réessayer avec', + '451' => 'Indisponible pour des raisons légales', + '499' => 'Demande fermée du client', + '500' => 'Erreur Interne du Serveur', + '501' => 'Pas mis en œuvre', + '502' => 'Mauvaise passerelle', + '503' => 'Mode de Maintenance', + '504' => 'Délai d\'attente de la passerelle', + '505' => 'Version HTTP non prise en charge', + '506' => 'La variante négocie également', + '507' => 'Espace insuffisant', + '508' => 'Boucle détectée', + '509' => 'Limite de bande passante dépassée', + '510' => 'Non prolongé', + '511' => 'Authentification réseau requise', + '520' => 'Erreur inconnue', + '521' => 'Le serveur Web est en panne', + '522' => 'La connexion a expiré', + '523' => 'L\'origine est inaccessible', + '524' => 'Un dépassement de délai s\'est produit', + '525' => 'Échec de la prise de contact SSL', + '526' => 'Certificat SSL invalide', + '527' => 'Erreur de canon ferroviaire', + '598' => 'Erreur de délai de lecture réseau', + '599' => 'Erreur de délai de connexion réseau', + 'unknownError' => 'Erreur inconnue', +]; diff --git a/resources/lang/fr/pagination.php b/resources/lang/fr/pagination.php new file mode 100644 index 0000000..225391e --- /dev/null +++ b/resources/lang/fr/pagination.php @@ -0,0 +1,8 @@ + 'Suivant »', + 'previous' => '« Précédent', +]; diff --git a/resources/lang/fr/passwords.php b/resources/lang/fr/passwords.php new file mode 100644 index 0000000..75ae148 --- /dev/null +++ b/resources/lang/fr/passwords.php @@ -0,0 +1,11 @@ + 'Votre mot de passe a été réinitialisé !', + 'sent' => 'Nous vous avons envoyé par email le lien de réinitialisation du mot de passe !', + 'throttled' => 'Veuillez patienter avant de réessayer.', + 'token' => 'Ce jeton de réinitialisation du mot de passe n\'est pas valide.', + 'user' => 'Aucun utilisateur n\'a été trouvé avec cette adresse email.', +]; diff --git a/resources/lang/fr/validation.php b/resources/lang/fr/validation.php new file mode 100644 index 0000000..8316397 --- /dev/null +++ b/resources/lang/fr/validation.php @@ -0,0 +1,217 @@ + 'Le champ :attribute doit être accepté.', + 'accepted_if' => 'Le champ :attribute doit être accepté quand :other a la valeur :value.', + 'active_url' => 'Le champ :attribute n\'est pas une URL valide.', + 'after' => 'Le champ :attribute doit être une date postérieure au :date.', + 'after_or_equal' => 'Le champ :attribute doit être une date postérieure ou égale au :date.', + 'alpha' => 'Le champ :attribute doit contenir uniquement des lettres.', + 'alpha_dash' => 'Le champ :attribute doit contenir uniquement des lettres, des chiffres et des tirets.', + 'alpha_num' => 'Le champ :attribute doit contenir uniquement des chiffres et des lettres.', + 'array' => 'Le champ :attribute doit être un tableau.', + 'ascii' => 'Le champ :attribute ne doit contenir que des caractères alphanumériques et des symboles codés sur un octet.', + 'before' => 'Le champ :attribute doit être une date antérieure au :date.', + 'before_or_equal' => 'Le champ :attribute doit être une date antérieure ou égale au :date.', + 'between' => [ + 'array' => 'Le tableau :attribute doit contenir entre :min et :max éléments.', + 'file' => 'La taille du fichier de :attribute doit être comprise entre :min et :max kilo-octets.', + 'numeric' => 'La valeur de :attribute doit être comprise entre :min et :max.', + 'string' => 'Le texte :attribute doit contenir entre :min et :max caractères.', + ], + 'boolean' => 'Le champ :attribute doit être vrai ou faux.', + 'can' => 'Le champ :attribute contient une valeur non autorisée.', + 'confirmed' => 'Le champ de confirmation :attribute ne correspond pas.', + 'current_password' => 'Le mot de passe est incorrect.', + 'date' => 'Le champ :attribute n\'est pas une date valide.', + 'date_equals' => 'Le champ :attribute doit être une date égale à :date.', + 'date_format' => 'Le champ :attribute ne correspond pas au format :format.', + 'decimal' => 'Le champ :attribute doit comporter :decimal décimales.', + 'declined' => 'Le champ :attribute doit être décliné.', + 'declined_if' => 'Le champ :attribute doit être décliné quand :other a la valeur :value.', + 'different' => 'Les champs :attribute et :other doivent être différents.', + 'digits' => 'Le champ :attribute doit contenir :digits chiffres.', + 'digits_between' => 'Le champ :attribute doit contenir entre :min et :max chiffres.', + 'dimensions' => 'La taille de l\'image :attribute n\'est pas conforme.', + 'distinct' => 'Le champ :attribute a une valeur en double.', + 'doesnt_end_with' => 'Le champ :attribute ne doit pas finir avec une des valeurs suivantes : :values.', + 'doesnt_start_with' => 'Le champ :attribute ne doit pas commencer avec une des valeurs suivantes : :values.', + 'email' => 'Le champ :attribute doit être une adresse e-mail valide.', + 'ends_with' => 'Le champ :attribute doit se terminer par une des valeurs suivantes : :values', + 'enum' => 'Le champ :attribute sélectionné est invalide.', + 'exists' => 'Le champ :attribute sélectionné est invalide.', + 'file' => 'Le champ :attribute doit être un fichier.', + 'filled' => 'Le champ :attribute doit avoir une valeur.', + 'gt' => [ + 'array' => 'Le tableau :attribute doit contenir plus de :value éléments.', + 'file' => 'La taille du fichier de :attribute doit être supérieure à :value kilo-octets.', + 'numeric' => 'La valeur de :attribute doit être supérieure à :value.', + 'string' => 'Le texte :attribute doit contenir plus de :value caractères.', + ], + 'gte' => [ + 'array' => 'Le tableau :attribute doit contenir au moins :value éléments.', + 'file' => 'La taille du fichier de :attribute doit être supérieure ou égale à :value kilo-octets.', + 'numeric' => 'La valeur de :attribute doit être supérieure ou égale à :value.', + 'string' => 'Le texte :attribute doit contenir au moins :value caractères.', + ], + 'image' => 'Le champ :attribute doit être une image.', + 'in' => 'Le champ :attribute est invalide.', + 'in_array' => 'Le champ :attribute n\'existe pas dans :other.', + 'integer' => 'Le champ :attribute doit être un entier.', + 'ip' => 'Le champ :attribute doit être une adresse IP valide.', + 'ipv4' => 'Le champ :attribute doit être une adresse IPv4 valide.', + 'ipv6' => 'Le champ :attribute doit être une adresse IPv6 valide.', + 'json' => 'Le champ :attribute doit être un document JSON valide.', + 'lowercase' => 'Le champ :attribute doit être en minuscules.', + 'lt' => [ + 'array' => 'Le tableau :attribute doit contenir moins de :value éléments.', + 'file' => 'La taille du fichier de :attribute doit être inférieure à :value kilo-octets.', + 'numeric' => 'La valeur de :attribute doit être inférieure à :value.', + 'string' => 'Le texte :attribute doit contenir moins de :value caractères.', + ], + 'lte' => [ + 'array' => 'Le tableau :attribute doit contenir au plus :value éléments.', + 'file' => 'La taille du fichier de :attribute doit être inférieure ou égale à :value kilo-octets.', + 'numeric' => 'La valeur de :attribute doit être inférieure ou égale à :value.', + 'string' => 'Le texte :attribute doit contenir au plus :value caractères.', + ], + 'mac_address' => 'Le champ :attribute doit être une adresse MAC valide.', + 'max' => [ + 'array' => 'Le tableau :attribute ne peut pas contenir plus que :max éléments.', + 'file' => 'La taille du fichier de :attribute ne peut pas dépasser :max kilo-octets.', + 'numeric' => 'La valeur de :attribute ne peut pas être supérieure à :max.', + 'string' => 'Le texte de :attribute ne peut pas contenir plus de :max caractères.', + ], + 'max_digits' => 'Le champ :attribute ne doit pas avoir plus de :max chiffres.', + 'mimes' => 'Le champ :attribute doit être un fichier de type : :values.', + 'mimetypes' => 'Le champ :attribute doit être un fichier de type : :values.', + 'min' => [ + 'array' => 'Le tableau :attribute doit contenir au moins :min éléments.', + 'file' => 'La taille du fichier de :attribute doit être supérieure ou égale à :min kilo-octets.', + 'numeric' => 'La valeur de :attribute doit être supérieure ou égale à :min.', + 'string' => 'Le texte de :attribute doit contenir au moins :min caractères.', + ], + 'min_digits' => 'Le champ :attribute doit avoir au moins :min chiffres.', + 'missing' => 'Le champ :attribute doit être manquant.', + 'missing_if' => 'Le champ :attribute doit être manquant quand :other a la valeur :value.', + 'missing_unless' => 'Le champ :attribute doit être manquant sauf si :other a la valeur :value.', + 'missing_with' => 'Le champ :attribute doit être manquant quand :values est présent.', + 'missing_with_all' => 'Le champ :attribute doit être manquant quand :values sont présents.', + 'multiple_of' => 'La valeur de :attribute doit être un multiple de :value', + 'not_in' => 'Le champ :attribute sélectionné n\'est pas valide.', + 'not_regex' => 'Le format du champ :attribute n\'est pas valide.', + 'numeric' => 'Le champ :attribute doit contenir un nombre.', + 'password' => [ + 'letters' => 'Le champ :attribute doit contenir au moins une lettre.', + 'mixed' => 'Le champ :attribute doit contenir au moins une majuscule et une minuscule.', + 'numbers' => 'Le champ :attribute doit contenir au moins un chiffre.', + 'symbols' => 'Le champ :attribute doit contenir au moins un symbole.', + 'uncompromised' => 'La valeur du champ :attribute est apparue dans une fuite de données. Veuillez choisir une valeur différente.', + ], + 'present' => 'Le champ :attribute doit être présent.', + 'prohibited' => 'Le champ :attribute est interdit.', + 'prohibited_if' => 'Le champ :attribute est interdit quand :other a la valeur :value.', + 'prohibited_unless' => 'Le champ :attribute est interdit à moins que :other est l\'une des valeurs :values.', + 'prohibits' => 'Le champ :attribute interdit :other d\'être présent.', + 'regex' => 'Le format du champ :attribute est invalide.', + 'required' => 'Le champ :attribute est obligatoire.', + 'required_array_keys' => 'Le champ :attribute doit contenir des entrées pour : :values.', + 'required_if' => 'Le champ :attribute est obligatoire quand la valeur de :other est :value.', + 'required_if_accepted' => 'Le champ :attribute est obligatoire quand le champ :other a été accepté.', + 'required_unless' => 'Le champ :attribute est obligatoire sauf si :other est :values.', + 'required_with' => 'Le champ :attribute est obligatoire quand :values est présent.', + 'required_with_all' => 'Le champ :attribute est obligatoire quand :values sont présents.', + 'required_without' => 'Le champ :attribute est obligatoire quand :values n\'est pas présent.', + 'required_without_all' => 'Le champ :attribute est requis quand aucun de :values n\'est présent.', + 'same' => 'Les champs :attribute et :other doivent être identiques.', + 'size' => [ + 'array' => 'Le tableau :attribute doit contenir :size éléments.', + 'file' => 'La taille du fichier de :attribute doit être de :size kilo-octets.', + 'numeric' => 'La valeur de :attribute doit être :size.', + 'string' => 'Le texte de :attribute doit contenir :size caractères.', + ], + 'starts_with' => 'Le champ :attribute doit commencer avec une des valeurs suivantes : :values', + 'string' => 'Le champ :attribute doit être une chaîne de caractères.', + 'timezone' => 'Le champ :attribute doit être un fuseau horaire valide.', + 'ulid' => 'Le champ :attribute doit être un ULID valide.', + 'unique' => 'La valeur du champ :attribute est déjà utilisée.', + 'uploaded' => 'Le fichier du champ :attribute n\'a pu être téléversé.', + 'uppercase' => 'Le champ :attribute doit être en majuscules.', + 'url' => 'Le format de l\'URL de :attribute n\'est pas valide.', + 'uuid' => 'Le champ :attribute doit être un UUID valide', + 'attributes' => [ + 'address' => 'adresse', + 'age' => 'âge', + 'amount' => 'montant', + 'area' => 'zone', + 'available' => 'disponible', + 'birthday' => 'anniversaire', + 'body' => 'corps', + 'city' => 'ville', + 'content' => 'contenu', + 'country' => 'pays', + 'created_at' => 'créé à', + 'creator' => 'créateur', + 'current_password' => 'mot de passe actuel', + 'date' => 'Date', + 'date_of_birth' => 'date de naissance', + 'day' => 'jour', + 'deleted_at' => 'supprimé à', + 'description' => 'la description', + 'district' => 'quartier', + 'duration' => 'durée', + 'email' => 'adresse e-mail', + 'excerpt' => 'extrait', + 'filter' => 'filtre', + 'first_name' => 'prénom', + 'gender' => 'genre', + 'group' => 'groupe', + 'hour' => 'heure', + 'image' => 'image', + 'last_name' => 'nom', + 'lesson' => 'leçon', + 'line_address_1' => 'ligne d\'adresse 1', + 'line_address_2' => 'ligne d\'adresse 2', + 'message' => 'message', + 'middle_name' => 'deuxième prénom', + 'minute' => 'minute', + 'mobile' => 'portable', + 'month' => 'mois', + 'name' => 'nom', + 'national_code' => 'code national', + 'number' => 'numéro', + 'password' => 'mot de passe', + 'password_confirmation' => 'confirmation du mot de passe', + 'phone' => 'téléphone', + 'photo' => 'photo', + 'postal_code' => 'code postal', + 'price' => 'prix', + 'province' => 'région', + 'recaptcha_response_field' => 'champ de réponse recaptcha', + 'remember' => 'se souvenir', + 'restored_at' => 'restauré à', + 'result_text_under_image' => 'texte de résultat sous l\'image', + 'role' => 'rôle', + 'second' => 'seconde', + 'sex' => 'sexe', + 'short_text' => 'texte court', + 'size' => 'taille', + 'state' => 'état', + 'street' => 'rue', + 'student' => 'étudiant', + 'subject' => 'sujet', + 'teacher' => 'professeur', + 'terms' => 'conditions', + 'test_description' => 'description test', + 'test_locale' => 'localisation test', + 'test_name' => 'nom test', + 'text' => 'texte', + 'time' => 'heure', + 'title' => 'titre', + 'updated_at' => 'mis à jour à', + 'username' => 'nom d\'utilisateur', + 'year' => 'année', + ], +]; diff --git a/routes/api.php b/routes/api.php index f5eed4e..c8885d1 100644 --- a/routes/api.php +++ b/routes/api.php @@ -21,6 +21,8 @@ | be assigned to the "api" middleware group. Make something great! | */ +Route::get('lang/{locale}','LocalizationController@set_lang'); + Route::post('/register', [UserController::class, 'store'])->name('register'); Route::post('/login', [AuthController::class, 'login'])->name('login'); From c58f01fb9c66af85c0564a8a3826d389087233e2 Mon Sep 17 00:00:00 2001 From: levifvy Date: Sun, 23 Jul 2023 20:23:38 +0200 Subject: [PATCH 03/33] Adding Traits directory and configure mutators. --- app/Models/Faq.php | 6 ++-- app/Models/Traits/Mutators/FaqMutators.php | 18 +++++++++++ app/Traits/Translations.php | 32 +++++++++++++++++++ .../2023_05_25_093101_create_faqs_table.php | 1 + ...07_23_085145_create_translations_table.php | 32 +++++++++++++++++++ database/seeders/DatabaseSeeder.php | 2 +- resources/lang/ca/api.php | 9 ++++++ resources/lang/ca/app.php | 4 --- resources/lang/en/{app.php => api.php} | 0 resources/lang/es/{app.php => api.php} | 0 resources/lang/fr/api.php | 9 ++++++ 11 files changed, 106 insertions(+), 7 deletions(-) create mode 100644 app/Models/Traits/Mutators/FaqMutators.php create mode 100644 app/Traits/Translations.php create mode 100644 database/migrations/2023_07_23_085145_create_translations_table.php create mode 100644 resources/lang/ca/api.php delete mode 100644 resources/lang/ca/app.php rename resources/lang/en/{app.php => api.php} (100%) rename resources/lang/es/{app.php => api.php} (100%) create mode 100644 resources/lang/fr/api.php diff --git a/app/Models/Faq.php b/app/Models/Faq.php index 2a17e4b..acf845d 100644 --- a/app/Models/Faq.php +++ b/app/Models/Faq.php @@ -4,7 +4,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; - +use App\Models\Traits\Mutators\FaqMutators; /** * @OA\Schema( * title="Faq", @@ -46,6 +46,7 @@ class Faq extends Model { use HasFactory; + use FaqMutators; /** * The attributes that are mass assignable. @@ -54,6 +55,7 @@ class Faq extends Model */ protected $fillable = [ 'title', - 'description' + 'description', + 'locale' ]; } diff --git a/app/Models/Traits/Mutators/FaqMutators.php b/app/Models/Traits/Mutators/FaqMutators.php new file mode 100644 index 0000000..05ededd --- /dev/null +++ b/app/Models/Traits/Mutators/FaqMutators.php @@ -0,0 +1,18 @@ +translation('title', $value); + } + + public function getDescriptionAttribute($value) + { + return $this->translation('description', $value); + } +} \ No newline at end of file diff --git a/app/Traits/Translations.php b/app/Traits/Translations.php new file mode 100644 index 0000000..4f0dab6 --- /dev/null +++ b/app/Traits/Translations.php @@ -0,0 +1,32 @@ +locale == $locale) { + return $default; + } + + $translation = DB::table('translations') + ->where('table', $this->table) + ->where('column', $column) + ->where('row_id', $this->id) + ->where('locale', $locale) + ->first(); + + if ($translation) { + return $translation->translation; + }else { + return $default; + } + } + + +} \ No newline at end of file diff --git a/database/migrations/2023_05_25_093101_create_faqs_table.php b/database/migrations/2023_05_25_093101_create_faqs_table.php index b606529..f1b7728 100644 --- a/database/migrations/2023_05_25_093101_create_faqs_table.php +++ b/database/migrations/2023_05_25_093101_create_faqs_table.php @@ -15,6 +15,7 @@ public function up(): void $table->id(); $table->char('title', 255); $table->longText('description'); + $table->string('locale')->default('es'); $table->timestamps(); }); } diff --git a/database/migrations/2023_07_23_085145_create_translations_table.php b/database/migrations/2023_07_23_085145_create_translations_table.php new file mode 100644 index 0000000..486a4b3 --- /dev/null +++ b/database/migrations/2023_07_23_085145_create_translations_table.php @@ -0,0 +1,32 @@ +id(); + $table->string('table'); + $table->string('column'); + $table->unsignedBigInteger('row_id'); + $table->string('locale'); + $table->longText('translation'); + + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('translations'); + } +}; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 1160e52..3d1fa47 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -15,6 +15,6 @@ public function run(): void \App\Models\App::factory(10)->create(); \App\Models\User::factory(3)->create(); - \App\Models\Faq::factory(3)->create(); + // \App\Models\Faq::factory(3)->create(); } } diff --git a/resources/lang/ca/api.php b/resources/lang/ca/api.php new file mode 100644 index 0000000..fd4e5e5 --- /dev/null +++ b/resources/lang/ca/api.php @@ -0,0 +1,9 @@ + 'Aplicació en diversos idiomes', + 'select_locale' => 'Seleccioneu el vostre idioma', + 'example' => 'Exemple:', + 'articles' => 'Articles:', + 'title' => 'Títol', + 'content' => 'Contingut', +]; \ No newline at end of file diff --git a/resources/lang/ca/app.php b/resources/lang/ca/app.php deleted file mode 100644 index 89d8dd2..0000000 --- a/resources/lang/ca/app.php +++ /dev/null @@ -1,4 +0,0 @@ - 'Aplicació multi-idioma', -]; \ No newline at end of file diff --git a/resources/lang/en/app.php b/resources/lang/en/api.php similarity index 100% rename from resources/lang/en/app.php rename to resources/lang/en/api.php diff --git a/resources/lang/es/app.php b/resources/lang/es/api.php similarity index 100% rename from resources/lang/es/app.php rename to resources/lang/es/api.php diff --git a/resources/lang/fr/api.php b/resources/lang/fr/api.php new file mode 100644 index 0000000..bb8a230 --- /dev/null +++ b/resources/lang/fr/api.php @@ -0,0 +1,9 @@ + 'Application multilingue', + 'select_locale' => 'Sélectionnez votre langue', + 'example' => 'Exemple:', + 'articles' => 'article:', + 'title' => 'Titre', + 'content' => 'Contenu', +]; \ No newline at end of file From ed0207b078946a89d445db781d68a2ea58809e69 Mon Sep 17 00:00:00 2001 From: levifvy Date: Mon, 24 Jul 2023 00:19:42 +0200 Subject: [PATCH 04/33] setting functionalities tanslatable --- app/Http/Controllers/TranslateController.php | 24 ++ app/Http/Kernel.php | 2 + app/Http/Middleware/SetApiLocale.php | 30 ++ app/Http/Middleware/SetLocale.php | 26 ++ composer.json | 3 +- composer.lock | 300 ++++++++++++++----- config/app.php | 4 +- routes/api.php | 3 + 8 files changed, 314 insertions(+), 78 deletions(-) create mode 100644 app/Http/Controllers/TranslateController.php create mode 100644 app/Http/Middleware/SetApiLocale.php create mode 100644 app/Http/Middleware/SetLocale.php diff --git a/app/Http/Controllers/TranslateController.php b/app/Http/Controllers/TranslateController.php new file mode 100644 index 0000000..bfac3d3 --- /dev/null +++ b/app/Http/Controllers/TranslateController.php @@ -0,0 +1,24 @@ +map(function ($faqs) { + return [ + 'name' => translatable($faqs, 'name'), + 'description' => translatable($faqs, 'description'), + ]; + }); + + return response()->json($translatedFaqs); +} +} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 3fb73a5..266ece6 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -43,6 +43,8 @@ class Kernel extends HttpKernel \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', \Illuminate\Routing\Middleware\SubstituteBindings::class, \App\Http\Middleware\Localization::class, + //'setLocale' => \App\Http\Middleware\SetLocale::class, + \App\Http\Middleware\SetApiLocale::class, ], ]; diff --git a/app/Http/Middleware/SetApiLocale.php b/app/Http/Middleware/SetApiLocale.php new file mode 100644 index 0000000..cdb6407 --- /dev/null +++ b/app/Http/Middleware/SetApiLocale.php @@ -0,0 +1,30 @@ +header('Accept-Language'); + + $supportedLocales = config('translatable.locales'); + if (!in_array($locale, $supportedLocales)) { + + $locale = config('app.locale'); + } + + app()->setLocale($locale); + + return $next($request); + } +} diff --git a/app/Http/Middleware/SetLocale.php b/app/Http/Middleware/SetLocale.php new file mode 100644 index 0000000..70fb4b7 --- /dev/null +++ b/app/Http/Middleware/SetLocale.php @@ -0,0 +1,26 @@ +input('lang', null); + + if ($locale) { + app()->setLocale($locale); + } + + return $next($request); + } +} diff --git a/composer.json b/composer.json index d59e215..97eb7f7 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,8 @@ "laravel/passport": "^11.8", "laravel/sanctum": "^3.2", "laravel/tinker": "^2.8", - "laraveles/spanish": "^1.5" + "laraveles/spanish": "^1.5", + "spatie/laravel-translatable": "^6.5" }, "require-dev": { "fakerphp/faker": "^1.9.1", diff --git a/composer.lock b/composer.lock index 4cd54fd..7a9701c 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": "6036e773e70a9ba0ff7c5959db604ee4", + "content-hash": "411aff351e4c790b47f519f5966414a1", "packages": [ { "name": "brick/math", @@ -656,16 +656,16 @@ }, { "name": "firebase/php-jwt", - "version": "v6.8.0", + "version": "v6.8.1", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "48b0210c51718d682e53210c24d25c5a10a2299b" + "reference": "5dbc8959427416b8ee09a100d7a8588c00fb2e26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/48b0210c51718d682e53210c24d25c5a10a2299b", - "reference": "48b0210c51718d682e53210c24d25c5a10a2299b", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/5dbc8959427416b8ee09a100d7a8588c00fb2e26", + "reference": "5dbc8959427416b8ee09a100d7a8588c00fb2e26", "shasum": "" }, "require": { @@ -713,9 +713,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.8.0" + "source": "https://github.com/firebase/php-jwt/tree/v6.8.1" }, - "time": "2023-06-20T16:45:35+00:00" + "time": "2023-07-14T18:33:00+00:00" }, { "name": "fruitcake/php-cors", @@ -1261,16 +1261,16 @@ }, { "name": "laravel/framework", - "version": "v10.14.1", + "version": "v10.15.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "6f89a2b74b232d8bf2e1d9ed87e311841263dfcb" + "reference": "c7599dc92e04532824bafbd226c2936ce6a905b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/6f89a2b74b232d8bf2e1d9ed87e311841263dfcb", - "reference": "6f89a2b74b232d8bf2e1d9ed87e311841263dfcb", + "url": "https://api.github.com/repos/laravel/framework/zipball/c7599dc92e04532824bafbd226c2936ce6a905b8", + "reference": "c7599dc92e04532824bafbd226c2936ce6a905b8", "shasum": "" }, "require": { @@ -1457,7 +1457,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-06-28T14:25:16+00:00" + "time": "2023-07-11T13:43:52+00:00" }, { "name": "laravel/passport", @@ -3979,16 +3979,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.18", + "version": "v0.11.19", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec" + "reference": "1724ceff278daeeac5a006744633bacbb2dc4706" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4f00ee9e236fa6a48f4560d1300b9c961a70a7ec", - "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/1724ceff278daeeac5a006744633bacbb2dc4706", + "reference": "1724ceff278daeeac5a006744633bacbb2dc4706", "shasum": "" }, "require": { @@ -4049,9 +4049,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.18" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.19" }, - "time": "2023-05-23T02:31:11+00:00" + "time": "2023-07-15T19:42:19+00:00" }, { "name": "ralouphie/getallheaders", @@ -4278,6 +4278,148 @@ ], "time": "2023-04-15T23:01:58+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": "spatie/laravel-translatable", + "version": "6.5.3", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-translatable.git", + "reference": "1906a3f1492c4b4b99d9f150b67cca4b697d85d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-translatable/zipball/1906a3f1492c4b4b99d9f150b67cca4b697d85d7", + "reference": "1906a3f1492c4b4b99d9f150b67cca4b697d85d7", + "shasum": "" + }, + "require": { + "illuminate/database": "^9.0|^10.0", + "illuminate/support": "^9.0|^10.0", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.11" + }, + "require-dev": { + "mockery/mockery": "^1.4", + "orchestra/testbench": "^7.0|^8.0", + "pestphp/pest": "^1.20" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\Translatable\\TranslatableServiceProvider" + ] + }, + "aliases": { + "Translatable": "Spatie\\Translatable\\Facades\\Translatable" + } + }, + "autoload": { + "psr-4": { + "Spatie\\Translatable\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + }, + { + "name": "Sebastian De Deyne", + "email": "sebastian@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "A trait to make an Eloquent model hold translations", + "homepage": "https://github.com/spatie/laravel-translatable", + "keywords": [ + "eloquent", + "i8n", + "laravel-translatable", + "model", + "multilingual", + "spatie", + "translate" + ], + "support": { + "issues": "https://github.com/spatie/laravel-translatable/issues", + "source": "https://github.com/spatie/laravel-translatable/tree/6.5.3" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2023-07-19T19:21:38+00:00" + }, { "name": "stella-maris/clock", "version": "0.1.7", @@ -4327,16 +4469,16 @@ }, { "name": "swagger-api/swagger-ui", - "version": "v5.1.0", + "version": "v5.1.3", "source": { "type": "git", "url": "https://github.com/swagger-api/swagger-ui.git", - "reference": "7e585621a1bbaeb226c0b2817de684c43044d0fd" + "reference": "60f39c92d78d3ff30373018a6499dbce9eff3746" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/7e585621a1bbaeb226c0b2817de684c43044d0fd", - "reference": "7e585621a1bbaeb226c0b2817de684c43044d0fd", + "url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/60f39c92d78d3ff30373018a6499dbce9eff3746", + "reference": "60f39c92d78d3ff30373018a6499dbce9eff3746", "shasum": "" }, "type": "library", @@ -4382,9 +4524,9 @@ ], "support": { "issues": "https://github.com/swagger-api/swagger-ui/issues", - "source": "https://github.com/swagger-api/swagger-ui/tree/v5.1.0" + "source": "https://github.com/swagger-api/swagger-ui/tree/v5.1.3" }, - "time": "2023-06-19T09:17:08+00:00" + "time": "2023-07-18T08:20:42+00:00" }, { "name": "symfony/console", @@ -7586,16 +7728,16 @@ }, { "name": "filp/whoops", - "version": "2.15.2", + "version": "2.15.3", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73" + "reference": "c83e88a30524f9360b11f585f71e6b17313b7187" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", - "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", + "url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187", + "reference": "c83e88a30524f9360b11f585f71e6b17313b7187", "shasum": "" }, "require": { @@ -7645,7 +7787,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.2" + "source": "https://github.com/filp/whoops/tree/2.15.3" }, "funding": [ { @@ -7653,7 +7795,7 @@ "type": "github" } ], - "time": "2023-04-12T12:00:00+00:00" + "time": "2023-07-13T12:00:00+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -7932,16 +8074,16 @@ }, { "name": "laravel-lang/lang", - "version": "12.24.0", + "version": "12.24.1", "source": { "type": "git", "url": "https://github.com/Laravel-Lang/lang.git", - "reference": "5b779cda146f36b63381cdc010ddfe11641091ab" + "reference": "e253e448432100aed7d18a20983b0f5a36909f36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Laravel-Lang/lang/zipball/5b779cda146f36b63381cdc010ddfe11641091ab", - "reference": "5b779cda146f36b63381cdc010ddfe11641091ab", + "url": "https://api.github.com/repos/Laravel-Lang/lang/zipball/e253e448432100aed7d18a20983b0f5a36909f36", + "reference": "e253e448432100aed7d18a20983b0f5a36909f36", "shasum": "" }, "require": { @@ -7994,7 +8136,7 @@ "type": "open_collective" } ], - "time": "2023-07-22T09:53:38+00:00" + "time": "2023-07-23T21:20:12+00:00" }, { "name": "laravel-lang/publisher", @@ -8105,16 +8247,16 @@ }, { "name": "laravel/pint", - "version": "v1.10.3", + "version": "v1.10.5", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "c472786bca01e4812a9bb7933b23edfc5b6877b7" + "reference": "a458fb057bfa2f5a09888a8aa349610be807b0c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/c472786bca01e4812a9bb7933b23edfc5b6877b7", - "reference": "c472786bca01e4812a9bb7933b23edfc5b6877b7", + "url": "https://api.github.com/repos/laravel/pint/zipball/a458fb057bfa2f5a09888a8aa349610be807b0c3", + "reference": "a458fb057bfa2f5a09888a8aa349610be807b0c3", "shasum": "" }, "require": { @@ -8125,9 +8267,9 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.18.0", + "friendsofphp/php-cs-fixer": "^3.21.1", "illuminate/view": "^10.5.1", - "laravel-zero/framework": "^10.0.2", + "laravel-zero/framework": "^10.1.1", "mockery/mockery": "^1.5.1", "nunomaduro/larastan": "^2.5.1", "nunomaduro/termwind": "^1.15.1", @@ -8167,20 +8309,20 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2023-06-20T15:55:03+00:00" + "time": "2023-07-14T10:26:01+00:00" }, { "name": "laravel/sail", - "version": "v1.23.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "a2e046f748e87d3ef8b2b381e0e5c5a11f34e46b" + "reference": "62582606f80466aa81fba40b193b289106902853" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/a2e046f748e87d3ef8b2b381e0e5c5a11f34e46b", - "reference": "a2e046f748e87d3ef8b2b381e0e5c5a11f34e46b", + "url": "https://api.github.com/repos/laravel/sail/zipball/62582606f80466aa81fba40b193b289106902853", + "reference": "62582606f80466aa81fba40b193b289106902853", "shasum": "" }, "require": { @@ -8232,41 +8374,37 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2023-06-16T21:20:12+00:00" + "time": "2023-06-28T18:31:28+00:00" }, { "name": "mockery/mockery", - "version": "1.6.2", + "version": "1.6.4", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "13a7fa2642c76c58fa2806ef7f565344c817a191" + "reference": "d1413755e26fe56a63455f7753221c86cbb88f66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/13a7fa2642c76c58fa2806ef7f565344c817a191", - "reference": "13a7fa2642c76c58fa2806ef7f565344c817a191", + "url": "https://api.github.com/repos/mockery/mockery/zipball/d1413755e26fe56a63455f7753221c86cbb88f66", + "reference": "d1413755e26fe56a63455f7753221c86cbb88f66", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": "^7.4 || ^8.0" + "php": ">=7.4,<8.3" }, "conflict": { "phpunit/phpunit": "<8.0" }, "require-dev": { "phpunit/phpunit": "^8.5 || ^9.3", - "psalm/plugin-phpunit": "^0.18", - "vimeo/psalm": "^5.9" + "psalm/plugin-phpunit": "^0.18.4", + "symplify/easy-coding-standard": "^11.5.0", + "vimeo/psalm": "^5.13.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.6.x-dev" - } - }, "autoload": { "files": [ "library/helpers.php", @@ -8284,12 +8422,20 @@ { "name": "Pádraic Brady", "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "homepage": "https://github.com/padraic", + "role": "Author" }, { "name": "Dave Marshall", "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" } ], "description": "Mockery is a simple yet flexible PHP mock object framework", @@ -8307,10 +8453,13 @@ "testing" ], "support": { + "docs": "https://docs.mockery.io/", "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.6.2" + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" }, - "time": "2023-06-07T09:07:52+00:00" + "time": "2023-07-19T15:51:02+00:00" }, { "name": "myclabs/deep-copy", @@ -8900,16 +9049,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.2.4", + "version": "10.2.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "68484779b5a2ed711fbdeba6ca01910d87acdff2" + "reference": "1c17815c129f133f3019cc18e8d0c8622e6d9bcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/68484779b5a2ed711fbdeba6ca01910d87acdff2", - "reference": "68484779b5a2ed711fbdeba6ca01910d87acdff2", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1c17815c129f133f3019cc18e8d0c8622e6d9bcd", + "reference": "1c17815c129f133f3019cc18e8d0c8622e6d9bcd", "shasum": "" }, "require": { @@ -8981,7 +9130,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.2.4" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.2.6" }, "funding": [ { @@ -8997,7 +9146,7 @@ "type": "tidelift" } ], - "time": "2023-07-10T04:06:08+00:00" + "time": "2023-07-17T12:08:28+00:00" }, { "name": "sebastian/cli-parser", @@ -9509,16 +9658,16 @@ }, { "name": "sebastian/global-state", - "version": "6.0.0", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "aab257c712de87b90194febd52e4d184551c2d44" + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/aab257c712de87b90194febd52e4d184551c2d44", - "reference": "aab257c712de87b90194febd52e4d184551c2d44", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4", + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4", "shasum": "" }, "require": { @@ -9558,7 +9707,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.0" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1" }, "funding": [ { @@ -9566,7 +9716,7 @@ "type": "github" } ], - "time": "2023-02-03T07:07:38+00:00" + "time": "2023-07-19T07:19:23+00:00" }, { "name": "sebastian/lines-of-code", diff --git a/config/app.php b/config/app.php index 4d4bee8..a9a7e15 100644 --- a/config/app.php +++ b/config/app.php @@ -181,7 +181,7 @@ Illuminate\Translation\TranslationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, - + /* * Package Service Providers... */ @@ -195,7 +195,7 @@ App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, L5Swagger\L5SwaggerServiceProvider::class, - + Spatie\Translatable\TranslatableServiceProvider::class, ], /* diff --git a/routes/api.php b/routes/api.php index c8885d1..0befdaa 100644 --- a/routes/api.php +++ b/routes/api.php @@ -21,6 +21,8 @@ | be assigned to the "api" middleware group. Make something great! | */ +// Route::middleware('setLocale')->group(function () { + Route::get('lang/{locale}','LocalizationController@set_lang'); Route::post('/register', [UserController::class, 'store'])->name('register'); @@ -51,4 +53,5 @@ Route::delete('/apps/{id}', [AppController::class, 'destroy'])->name('app.destroy'); }); +// }); From aacc548263966bb15eaac10512a5616b9345fe35 Mon Sep 17 00:00:00 2001 From: levifvy Date: Mon, 24 Jul 2023 13:41:02 +0200 Subject: [PATCH 05/33] Adding trait to switcher --- app/Http/Controllers/api/FaqController.php | 60 ++++--- app/Models/App.php | 5 +- app/Models/Faq.php | 5 +- app/Traits/Translations.php | 2 - composer.json | 1 + composer.lock | 105 +++++++++++- config/translatable.php | 150 ++++++++++++++++++ .../2023_05_25_093101_create_faqs_table.php | 15 +- .../2023_05_25_093121_create_apps_table.php | 17 +- 9 files changed, 317 insertions(+), 43 deletions(-) create mode 100644 config/translatable.php diff --git a/app/Http/Controllers/api/FaqController.php b/app/Http/Controllers/api/FaqController.php index 4073558..2a3089a 100644 --- a/app/Http/Controllers/api/FaqController.php +++ b/app/Http/Controllers/api/FaqController.php @@ -53,11 +53,15 @@ public function show($id) { $faq = Faq::find($id); + if (!$faq) { + return response()->json(['error' => 'FAQ not found'], 404); + } + return response()->json([ 'id' => $faq->id, 'title' => $faq->title, 'description' => $faq->description, - 'created_at'=> $faq->created_at, + 'created_at' => $faq->created_at, 'updated_at' => $faq->updated_at ]); } @@ -97,12 +101,14 @@ public function store(Request $request) { try { $validatedData = $request->validate([ - 'title' => ['required', 'string', 'max:255'], - 'description' => ['required', 'string'], + 'title' => ['required', 'array'], + 'title.*' => ['required', 'string', 'max:255'], + 'description' => ['required', 'array'], + 'description.*' => ['required', 'string'], ]); - + $faq = Faq::create($validatedData); - + return response()->json(['faq' => $faq], 201); } catch (ValidationException $e) { return response()->json(['errors' => $e->errors()], 422); @@ -150,29 +156,31 @@ public function store(Request $request) * ) * ) */ - public function update(Request $request, $id) - { - try { - $faqs = Faq::find($id); - - if (!$faqs) { - return response()->json(['error' => 'FAQ not found'], 404); - } - - $validatedData = $request->validate([ - 'title' => 'required|string|max:255', - 'description' => 'required|string', - ]); - - $faqs->title = $validatedData['title']; - $faqs->description = $validatedData['description']; - $faqs->save(); - - return response()->json(['message' => 'FAQ updated successfully']); - } catch (ValidationException $e) { - return response()->json(['errors' => $e->errors()], 422); +public function update(Request $request, $id) +{ + try { + $faq = Faq::find($id); + + if (!$faq) { + return response()->json(['error' => 'FAQ not found'], 404); } + + $validatedData = $request->validate([ + 'title' => ['required', 'array'], + 'title.*' => ['required', 'string', 'max:255'], + 'description' => ['required', 'array'], + 'description.*' => ['required', 'string'], + ]); + + $faq->setTranslations('title', $validatedData['title']); + $faq->setTranslations('description', $validatedData['description']); + $faq->save(); + + return response()->json(['message' => 'FAQ updated successfully']); + } catch (ValidationException $e) { + return response()->json(['errors' => $e->errors()], 422); } +} /** * @OA\Delete( diff --git a/app/Models/App.php b/app/Models/App.php index 1d3ac1b..5b8539f 100644 --- a/app/Models/App.php +++ b/app/Models/App.php @@ -4,6 +4,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use Spatie\Translatable\HasTranslations; /** * @OA\Schema( @@ -58,7 +59,7 @@ */ class App extends Model { - use HasFactory; - + use HasFactory, HasTranslations; + protected $translatable = ['title', 'description']; protected $fillable = ['title', 'description', 'url', 'state']; } diff --git a/app/Models/Faq.php b/app/Models/Faq.php index acf845d..af43b1a 100644 --- a/app/Models/Faq.php +++ b/app/Models/Faq.php @@ -5,6 +5,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use App\Models\Traits\Mutators\FaqMutators; +use Spatie\Translatable\HasTranslations; /** * @OA\Schema( * title="Faq", @@ -46,13 +47,15 @@ class Faq extends Model { use HasFactory; - use FaqMutators; + // use FaqMutators; + use HasTranslations; /** * The attributes that are mass assignable. * * @var array */ + protected $translatable = ['title', 'description']; protected $fillable = [ 'title', 'description', diff --git a/app/Traits/Translations.php b/app/Traits/Translations.php index 4f0dab6..bd056f4 100644 --- a/app/Traits/Translations.php +++ b/app/Traits/Translations.php @@ -27,6 +27,4 @@ public function translation($column, $default = '') return $default; } } - - } \ No newline at end of file diff --git a/composer.json b/composer.json index 97eb7f7..dd841bc 100644 --- a/composer.json +++ b/composer.json @@ -6,6 +6,7 @@ "license": "MIT", "require": { "php": "^8.1", + "astrotomic/laravel-translatable": "^11.12", "darkaonline/l5-swagger": "^8.5", "guzzlehttp/guzzle": "^7.6", "laravel/framework": "^10.0", diff --git a/composer.lock b/composer.lock index 7a9701c..da72239 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,99 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "411aff351e4c790b47f519f5966414a1", + "content-hash": "f6de6de1d83a9ab498db1dc5345022fc", "packages": [ + { + "name": "astrotomic/laravel-translatable", + "version": "v11.12.1", + "source": { + "type": "git", + "url": "https://github.com/Astrotomic/laravel-translatable.git", + "reference": "04de8d1a7c8299a4071fd6bede41d47d264f2d4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Astrotomic/laravel-translatable/zipball/04de8d1a7c8299a4071fd6bede41d47d264f2d4d", + "reference": "04de8d1a7c8299a4071fd6bede41d47d264f2d4d", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0 || ^9.0 || ^10.0", + "illuminate/database": "^8.0 || ^9.0 || ^10.0", + "illuminate/support": "^8.0 || ^9.0 || ^10.0", + "php": "^8.0" + }, + "require-dev": { + "laravel/legacy-factories": "^1.0.4", + "mockery/mockery": "^1.3.3", + "orchestra/testbench": "^6.0 || ^7.0 || ^8.0", + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Astrotomic\\Translatable\\TranslatableServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Astrotomic\\Translatable\\": "src/Translatable/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tom Witkowski", + "email": "gummibeer@astrotomic.info", + "homepage": "https://gummibeer.de", + "role": "Developer" + }, + { + "name": "Dimitrios Savvopoulos", + "email": "ds@dimsav.com", + "homepage": "http://dimsav.com", + "role": "Developer" + } + ], + "description": "A Laravel package for multilingual models", + "homepage": "https://astrotomic.info", + "keywords": [ + "database", + "language", + "laravel", + "translation" + ], + "support": { + "docs": "https://docs.astrotomic.info/laravel-translatable", + "email": "dev@astrotomic.info", + "issues": "https://github.com/Astrotomic/laravel-translatable/issues", + "source": "https://github.com/Astrotomic/laravel-translatable" + }, + "funding": [ + { + "url": "https://forest.astrotomic.info", + "type": "custom" + }, + { + "url": "https://github.com/Gummibeer", + "type": "github" + }, + { + "url": "https://github.com/SarahSibert", + "type": "github" + }, + { + "url": "https://issuehunt.io/r/astrotomic", + "type": "issuehunt" + } + ], + "time": "2023-02-27T10:27:10+00:00" + }, { "name": "brick/math", "version": "0.11.0", @@ -4469,16 +4560,16 @@ }, { "name": "swagger-api/swagger-ui", - "version": "v5.1.3", + "version": "v5.2.0", "source": { "type": "git", "url": "https://github.com/swagger-api/swagger-ui.git", - "reference": "60f39c92d78d3ff30373018a6499dbce9eff3746" + "reference": "3f517470114e863d1620a1261a14094b386aca64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/60f39c92d78d3ff30373018a6499dbce9eff3746", - "reference": "60f39c92d78d3ff30373018a6499dbce9eff3746", + "url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/3f517470114e863d1620a1261a14094b386aca64", + "reference": "3f517470114e863d1620a1261a14094b386aca64", "shasum": "" }, "type": "library", @@ -4524,9 +4615,9 @@ ], "support": { "issues": "https://github.com/swagger-api/swagger-ui/issues", - "source": "https://github.com/swagger-api/swagger-ui/tree/v5.1.3" + "source": "https://github.com/swagger-api/swagger-ui/tree/v5.2.0" }, - "time": "2023-07-18T08:20:42+00:00" + "time": "2023-07-24T09:24:06+00:00" }, { "name": "symfony/console", diff --git a/config/translatable.php b/config/translatable.php new file mode 100644 index 0000000..3ba56a2 --- /dev/null +++ b/config/translatable.php @@ -0,0 +1,150 @@ + [ + 'ca', + 'en', + 'fr', + 'es' => [ + 'MX', // mexican spanish + 'CO', // colombian spanish + ], + ], + + /* + |-------------------------------------------------------------------------- + | Locale separator + |-------------------------------------------------------------------------- + | + | This is a string used to glue the language and the country when defining + | the available locales. Example: if set to '-', then the locale for + | colombian spanish will be saved as 'es-CO' into the database. + | + */ + 'locale_separator' => '-', + + /* + |-------------------------------------------------------------------------- + | Default locale + |-------------------------------------------------------------------------- + | + | As a default locale, Translatable takes the locale of Laravel's + | translator. If for some reason you want to override this, + | you can specify what default should be used here. + | If you set a value here it will only use the current config value + | and never fallback to the translator one. + | + */ + 'locale' => null, + + /* + |-------------------------------------------------------------------------- + | Use fallback + |-------------------------------------------------------------------------- + | + | Determine if fallback locales are returned by default or not. To add + | more flexibility and configure this option per "translatable" + | instance, this value will be overridden by the property + | $useTranslationFallback when defined + | + */ + 'use_fallback' => false, + + /* + |-------------------------------------------------------------------------- + | Use fallback per property + |-------------------------------------------------------------------------- + | + | The property fallback feature will return the translated value of + | the fallback locale if the property is empty for the selected + | locale. Note that 'use_fallback' must be enabled. + | + */ + 'use_property_fallback' => true, + + /* + |-------------------------------------------------------------------------- + | Fallback Locale + |-------------------------------------------------------------------------- + | + | A fallback locale is the locale being used to return a translation + | when the requested translation is not existing. To disable it + | set it to false. + | If set to null it will loop through all configured locales until + | one existing is found or end of list reached. The locales are looped + | from top to bottom and for country based locales the simple one + | is used first. So "es" will be checked before "es_MX". + | + */ + 'fallback_locale' => 'en', + + /* + |-------------------------------------------------------------------------- + | Translation Model Namespace + |-------------------------------------------------------------------------- + | + | Defines the default 'Translation' class namespace. For example, if + | you want to use App\Translations\CountryTranslation instead of App\CountryTranslation + | set this to 'App\Translations'. + | + */ + 'translation_model_namespace' => null, + + /* + |-------------------------------------------------------------------------- + | Translation Suffix + |-------------------------------------------------------------------------- + | + | Defines the default 'Translation' class suffix. For example, if + | you want to use CountryTrans instead of CountryTranslation + | application, set this to 'Trans'. + | + */ + 'translation_suffix' => 'Translation', + + /* + |-------------------------------------------------------------------------- + | Locale key + |-------------------------------------------------------------------------- + | + | Defines the 'locale' field name, which is used by the + | translation model. + | + */ + 'locale_key' => 'locale', + + /* + |-------------------------------------------------------------------------- + | Always load translations when converting to array + |-------------------------------------------------------------------------- + | Setting this to false will have a performance improvement but will + | not return the translations when using toArray(), unless the + | translations relationship is already loaded. + | + */ + 'to_array_always_loads_translations' => true, + + /* + |-------------------------------------------------------------------------- + | Configure the default behavior of the rule factory + |-------------------------------------------------------------------------- + | The default values used to control the behavior of the RuleFactory. + | Here you can set your own default format and delimiters for + | your whole app. + * + */ + 'rule_factory' => [ + 'format' => \Astrotomic\Translatable\Validation\RuleFactory::FORMAT_ARRAY, + 'prefix' => '%', + 'suffix' => '%', + ], +]; diff --git a/database/migrations/2023_05_25_093101_create_faqs_table.php b/database/migrations/2023_05_25_093101_create_faqs_table.php index f1b7728..8eab8e1 100644 --- a/database/migrations/2023_05_25_093101_create_faqs_table.php +++ b/database/migrations/2023_05_25_093101_create_faqs_table.php @@ -13,11 +13,19 @@ public function up(): void { Schema::create('faqs', function (Blueprint $table) { $table->id(); - $table->char('title', 255); - $table->longText('description'); - $table->string('locale')->default('es'); + $table->string('locale')->index(); $table->timestamps(); }); + + Schema::create('faq_translations', function (Blueprint $table) { + $table->id(); + $table->foreignId('faq_id')->constrained('faqs')->onDelete('cascade'); + $table->string('title'); + $table->text('description'); + $table->string('locale')->index(); + + $table->unique(['faq_id', 'locale']); + }); } /** @@ -25,6 +33,7 @@ public function up(): void */ public function down(): void { + Schema::dropIfExists('faq_translations'); Schema::dropIfExists('faqs'); } }; diff --git a/database/migrations/2023_05_25_093121_create_apps_table.php b/database/migrations/2023_05_25_093121_create_apps_table.php index f367557..9146bb0 100644 --- a/database/migrations/2023_05_25_093121_create_apps_table.php +++ b/database/migrations/2023_05_25_093121_create_apps_table.php @@ -13,12 +13,21 @@ public function up(): void { Schema::create('apps', function (Blueprint $table) { $table->id(); - $table->char('title', 255); - $table->longText('description'); + $table->string('locale')->index(); $table->text('url'); $table->enum('state', ['COMPLETED', 'IN PROGRESS', 'SOON']); $table->timestamps(); }); + + Schema::create('app_translations', function (Blueprint $table) { + $table->id(); + $table->foreignId('app_id')->constrained('apps')->onDelete('cascade'); + $table->string('title'); + $table->text('description'); + $table->string('locale')->index(); + + $table->unique(['app_id', 'locale']); + }); } /** @@ -26,6 +35,10 @@ public function up(): void */ public function down(): void { + Schema::dropIfExists('app_translations'); Schema::dropIfExists('apps'); } }; + + + From 84c5bad603813add01bff38a8c8dc5b6c23eb40d Mon Sep 17 00:00:00 2001 From: levifvy Date: Tue, 25 Jul 2023 12:49:23 +0200 Subject: [PATCH 06/33] addig accept_language variable to localization --- app/Http/Kernel.php | 7 ++++++- resources/lang/en/auth.php | 13 ++++++++++--- resources/lang/fr/auth.php | 9 ++++++++- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 266ece6..fb7e795 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -42,7 +42,7 @@ class Kernel extends HttpKernel // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', \Illuminate\Routing\Middleware\SubstituteBindings::class, - \App\Http\Middleware\Localization::class, + //\App\Http\Middleware\Localization::class, //'setLocale' => \App\Http\Middleware\SetLocale::class, \App\Http\Middleware\SetApiLocale::class, ], @@ -67,4 +67,9 @@ class Kernel extends HttpKernel 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, ]; + + protected $routeMiddleware = [ + //... + 'localization' => Localization::class, + ]; } diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php index 6db4982..70fd682 100644 --- a/resources/lang/en/auth.php +++ b/resources/lang/en/auth.php @@ -3,7 +3,14 @@ declare(strict_types=1); return [ - 'failed' => 'These credentials do not match our records.', - 'password' => 'The password is incorrect.', - 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + /** Login */ + "blocked" => "You have been blocked.", + "email_not_verified" => "Your email is not verified.", + 'failed' => 'These credentials do not match our records.', + "success" => "User authenticated successfully.", + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + 'password' => 'The password is incorrect.', + + /** Logout */ + "logout_success" => "User logged out successfully.", ]; diff --git a/resources/lang/fr/auth.php b/resources/lang/fr/auth.php index a22cd3f..445c999 100644 --- a/resources/lang/fr/auth.php +++ b/resources/lang/fr/auth.php @@ -3,7 +3,14 @@ declare(strict_types=1); return [ + /** Login */ + "blocked" => "Vous avez été bloqué.", + "email_not_verified" => "Votre email n'est pas vérifié.", 'failed' => 'Ces identifiants ne correspondent pas à nos enregistrements.', - 'password' => 'Le mot de passe est incorrect', + "success" => "L'utilisateur s'est authentifié avec succès.", 'throttle' => 'Tentatives de connexion trop nombreuses. Veuillez essayer de nouveau dans :seconds secondes.', + 'password' => 'Le mot de passe est incorrect', + + /** Logout */ + "logout_success" => "L'utilisateur s'est déconnecté avec succès.", ]; From 8f8b0759c38a739fd9cff29f568cb425c64eaa0c Mon Sep 17 00:00:00 2001 From: levifvy Date: Wed, 26 Jul 2023 02:34:28 +0200 Subject: [PATCH 07/33] making a link to data bases --- app/Http/Kernel.php | 6 ++- app/Http/Middleware/Localization.php | 18 +++++-- app/Http/Middleware/SetLocale.php | 23 +++++--- .../Middleware/TranslateDatabaseValues.php | 53 +++++++++++++++++++ config/app.php | 4 +- routes/api.php | 47 ++++++++-------- 6 files changed, 113 insertions(+), 38 deletions(-) create mode 100644 app/Http/Middleware/TranslateDatabaseValues.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index fb7e795..c48551e 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -36,6 +36,8 @@ class Kernel extends HttpKernel \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, + \App\Http\Middleware\SetLocale::class, + \App\Http\Middleware\TranslateDatabaseValues::class, ], 'api' => [ @@ -44,7 +46,9 @@ class Kernel extends HttpKernel \Illuminate\Routing\Middleware\SubstituteBindings::class, //\App\Http\Middleware\Localization::class, //'setLocale' => \App\Http\Middleware\SetLocale::class, - \App\Http\Middleware\SetApiLocale::class, + //\App\Http\Middleware\SetApiLocale::class, + \App\Http\Middleware\SetLocale::class, + \App\Http\Middleware\TranslateDatabaseValues::class, ], ]; diff --git a/app/Http/Middleware/Localization.php b/app/Http/Middleware/Localization.php index c409352..a6c8d2e 100644 --- a/app/Http/Middleware/Localization.php +++ b/app/Http/Middleware/Localization.php @@ -6,7 +6,7 @@ use Illuminate\Http\Request; use Symfony\Component\HttpFoundation\Response; use Illuminate\Support\Facades\App; - +use Illuminate\Support\Facades\Session; class Localization { /** @@ -16,11 +16,19 @@ class Localization */ public function handle(Request $request, Closure $next): Response { - if (session()->has('locale')){ + $userLanguage = $request->header('accept-language'); + + Session::put('language', $userLanguage); + + \View::share('t', function ($key) { + + + + App::setLocale($request->header("Accept-Language")); - App::setLocale(session()->get('locale')); - } + return $key; + }); return $next($request); } -} +} \ No newline at end of file diff --git a/app/Http/Middleware/SetLocale.php b/app/Http/Middleware/SetLocale.php index 70fb4b7..4e5b259 100644 --- a/app/Http/Middleware/SetLocale.php +++ b/app/Http/Middleware/SetLocale.php @@ -6,6 +6,9 @@ use Illuminate\Http\Request; use Symfony\Component\HttpFoundation\Response; +use Illuminate\Support\Facades\App; +use Illuminate\Support\Facades\Session; + class SetLocale { /** @@ -13,14 +16,22 @@ class SetLocale * * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next */ - public function handle(Request $request, Closure $next): Response + public function handle($request, Closure $next) { - $locale = $request->input('lang', null); - - if ($locale) { - app()->setLocale($locale); + if (in_array($request->header('Accept-Language'), config('app.supported_locales'))) { + + App::setLocale($request->header('Accept-Language')); + + Session::put('locale', $request->header('Accept-Language')); + + } else { + + App::setLocale(config('app.locale')); + + Session::put('locale', config('app.locale')); } - + return $next($request); } } + diff --git a/app/Http/Middleware/TranslateDatabaseValues.php b/app/Http/Middleware/TranslateDatabaseValues.php new file mode 100644 index 0000000..96bafcd --- /dev/null +++ b/app/Http/Middleware/TranslateDatabaseValues.php @@ -0,0 +1,53 @@ +leftJoin("{$column}_translations as {$column}_translation", function ($join) use ($column, $locale) { + + $join->on("{$column}.id", '=', "{$column}_translation.{$column}_id") + ->where("{$column}_translation.locale", '=', $locale); + + })->addSelect("{$column}_translation.{$column}"); + }); + + return $next($request); + } +} + + + +public function handle(Request $request, Closure $next): Response +{ + $locale = App::getLocale(); + + Builder::macro('translate', function ($column) use ($locale) { + + return $this->leftJoin("{$column}_translations as {$column}_translation", function ($join) use ($column, $locale) { + + $join->on("{$column}.id", '=', "{$column}_translation.{$column}_id") + ->where("{$column}_translation.locale", '=', $locale); + + })->addSelect("{$column}_translation.{$column}"); + }); + + return $next($request); +} \ No newline at end of file diff --git a/config/app.php b/config/app.php index a9a7e15..2545d22 100644 --- a/config/app.php +++ b/config/app.php @@ -95,8 +95,10 @@ | */ - 'fallback_locale' => 'en', + 'fallback_locale' => 'ca', + 'supported_locales' => ['ca', 'es', 'fr', 'en'], + /* |-------------------------------------------------------------------------- | Faker Locale diff --git a/routes/api.php b/routes/api.php index 0befdaa..15c5d0c 100644 --- a/routes/api.php +++ b/routes/api.php @@ -8,8 +8,7 @@ use App\Http\Controllers\api\CodeController; use App\Http\Controllers\api\AppController; use App\Http\Controllers\api\CollaboratorsController; - - +use App\Http\Middleware\Localization; use App\Http\Controllers\api\ForgetController; /* |-------------------------------------------------------------------------- @@ -21,37 +20,35 @@ | be assigned to the "api" middleware group. Make something great! | */ -// Route::middleware('setLocale')->group(function () { +Route::middleware("Setlocale")->group(function () { -Route::get('lang/{locale}','LocalizationController@set_lang'); + Route::post('/register', [UserController::class, 'store'])->name('register'); + Route::post('/login', [AuthController::class, 'login'])->name('login'); -Route::post('/register', [UserController::class, 'store'])->name('register'); -Route::post('/login', [AuthController::class, 'login'])->name('login'); + Route::get('/faqs', [FaqController::class, 'index']); + Route::get('/apps', [AppController::class, 'index'])->name('app.index'); -Route::get('/faqs', [FaqController::class, 'index']); -Route::get('/apps', [AppController::class, 'index'])->name('app.index'); + Route::get('/collaborators/{area}',[CollaboratorsController::class,'index']); -Route::get('/collaborators/{area}',[CollaboratorsController::class,'index']); + Route::middleware(['auth:api'])->prefix('faqs')->group(function () { + + Route::get('/{id}', [FaqController::class, 'show']); + Route::post('/', [FaqController::class, 'store']); + Route::put('/{id}', [FaqController::class, 'update']); + Route::delete('/{id}', [FaqController::class, 'destroy']); + }); -Route::middleware(['auth:api'])->prefix('faqs')->group(function () { - - Route::get('/{id}', [FaqController::class, 'show']); - Route::post('/', [FaqController::class, 'store']); - Route::put('/{id}', [FaqController::class, 'update']); - Route::delete('/{id}', [FaqController::class, 'destroy']); -}); + Route::post('/forgetpassword', [ForgetController::class, 'forgetPassword'])->name('forgetpassword'); -Route::post('/forgetpassword', [ForgetController::class, 'forgetPassword'])->name('forgetpassword'); + Route::post('/send-code-by-email', [CodeController::class, 'sendCodeByEmail'])->middleware('auth:api'); -Route::post('/send-code-by-email', [CodeController::class, 'sendCodeByEmail'])->middleware('auth:api'); + Route::middleware(['auth:api'])->group(function () { + Route::get('/apps/{id}', [AppController::class, 'show'])->name('app.show'); + Route::post('/apps', [AppController::class, 'store'])->name('app.store'); + Route::put('/apps/{id}', [AppController::class, 'update'])->name('app.update'); + Route::delete('/apps/{id}', [AppController::class, 'destroy'])->name('app.destroy'); + }); -Route::middleware(['auth:api'])->group(function () { - Route::get('/apps/{id}', [AppController::class, 'show'])->name('app.show'); - Route::post('/apps', [AppController::class, 'store'])->name('app.store'); - Route::put('/apps/{id}', [AppController::class, 'update'])->name('app.update'); - Route::delete('/apps/{id}', [AppController::class, 'destroy'])->name('app.destroy'); }); -// }); - From d922bc8e2d401b386dae573a41cb7baa0281f673 Mon Sep 17 00:00:00 2001 From: levifvy Date: Wed, 26 Jul 2023 02:38:41 +0200 Subject: [PATCH 08/33] setting TranslatableDatabasesvalue --- .../Middleware/TranslateDatabaseValues.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/app/Http/Middleware/TranslateDatabaseValues.php b/app/Http/Middleware/TranslateDatabaseValues.php index 96bafcd..2180fc0 100644 --- a/app/Http/Middleware/TranslateDatabaseValues.php +++ b/app/Http/Middleware/TranslateDatabaseValues.php @@ -31,23 +31,4 @@ public function handle(Request $request, Closure $next): Response return $next($request); } -} - - - -public function handle(Request $request, Closure $next): Response -{ - $locale = App::getLocale(); - - Builder::macro('translate', function ($column) use ($locale) { - - return $this->leftJoin("{$column}_translations as {$column}_translation", function ($join) use ($column, $locale) { - - $join->on("{$column}.id", '=', "{$column}_translation.{$column}_id") - ->where("{$column}_translation.locale", '=', $locale); - - })->addSelect("{$column}_translation.{$column}"); - }); - - return $next($request); } \ No newline at end of file From 55deca9ec2acdd2236959fa262bca8e6af6c69cf Mon Sep 17 00:00:00 2001 From: Edvenan Date: Wed, 4 Oct 2023 16:54:33 +0200 Subject: [PATCH 09/33] Clean up of files not required to meet the feature requirements --- .../Controllers/LocalizationController.php | 18 -- app/Http/Controllers/TranslateController.php | 24 -- app/Models/Traits/Mutators/FaqMutators.php | 18 -- app/Traits/Translations.php | 30 --- bootstrap/cache/.gitignore | 2 - resources/lang/ca.json | 39 ---- resources/lang/en.json | 39 ---- resources/lang/es.json | 55 ----- resources/lang/fr.json | 39 ---- resources/lang/fr/api.php | 9 - resources/lang/fr/auth.php | 16 -- resources/lang/fr/http-statuses.php | 84 ------- resources/lang/fr/pagination.php | 8 - resources/lang/fr/passwords.php | 11 - resources/lang/fr/validation.php | 217 ------------------ 15 files changed, 609 deletions(-) delete mode 100644 app/Http/Controllers/LocalizationController.php delete mode 100644 app/Http/Controllers/TranslateController.php delete mode 100644 app/Models/Traits/Mutators/FaqMutators.php delete mode 100644 app/Traits/Translations.php delete mode 100644 bootstrap/cache/.gitignore delete mode 100644 resources/lang/ca.json delete mode 100644 resources/lang/en.json delete mode 100644 resources/lang/es.json delete mode 100644 resources/lang/fr.json delete mode 100644 resources/lang/fr/api.php delete mode 100644 resources/lang/fr/auth.php delete mode 100644 resources/lang/fr/http-statuses.php delete mode 100644 resources/lang/fr/pagination.php delete mode 100644 resources/lang/fr/passwords.php delete mode 100644 resources/lang/fr/validation.php diff --git a/app/Http/Controllers/LocalizationController.php b/app/Http/Controllers/LocalizationController.php deleted file mode 100644 index e54c15b..0000000 --- a/app/Http/Controllers/LocalizationController.php +++ /dev/null @@ -1,18 +0,0 @@ -put('locale', $locale); - - return redirect()->back(); - } -} diff --git a/app/Http/Controllers/TranslateController.php b/app/Http/Controllers/TranslateController.php deleted file mode 100644 index bfac3d3..0000000 --- a/app/Http/Controllers/TranslateController.php +++ /dev/null @@ -1,24 +0,0 @@ -map(function ($faqs) { - return [ - 'name' => translatable($faqs, 'name'), - 'description' => translatable($faqs, 'description'), - ]; - }); - - return response()->json($translatedFaqs); -} -} diff --git a/app/Models/Traits/Mutators/FaqMutators.php b/app/Models/Traits/Mutators/FaqMutators.php deleted file mode 100644 index 05ededd..0000000 --- a/app/Models/Traits/Mutators/FaqMutators.php +++ /dev/null @@ -1,18 +0,0 @@ -translation('title', $value); - } - - public function getDescriptionAttribute($value) - { - return $this->translation('description', $value); - } -} \ No newline at end of file diff --git a/app/Traits/Translations.php b/app/Traits/Translations.php deleted file mode 100644 index bd056f4..0000000 --- a/app/Traits/Translations.php +++ /dev/null @@ -1,30 +0,0 @@ -locale == $locale) { - return $default; - } - - $translation = DB::table('translations') - ->where('table', $this->table) - ->where('column', $column) - ->where('row_id', $this->id) - ->where('locale', $locale) - ->first(); - - if ($translation) { - return $translation->translation; - }else { - return $default; - } - } -} \ No newline at end of file diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/bootstrap/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/resources/lang/ca.json b/resources/lang/ca.json deleted file mode 100644 index 09b1803..0000000 --- a/resources/lang/ca.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "(and :count more error)": "(i :count error més)", - "(and :count more errors)": "(i :count errors més)", - "All rights reserved.": "Tots els drets reservats.", - "Forbidden": "Prohibit", - "Go to page :page": "Aneu a la pàgina :page", - "Hello!": "Hola!", - "If you did not create an account, no further action is required.": "Si no heu creat cap compte, no es requereix cap acció adicional.", - "If you did not request a password reset, no further action is required.": "Si no heu sol·licitat el restabliment de la contrasenya, obvieu aquest correu electrònic.", - "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si té algun problema per a fer clic al botó \":actionText\", copii i enganxi la següent URL al seu navegador web", - "Invalid JSON was returned from the route.": "S'ha retornat un JSON no vàlid des de la ruta.", - "Login": "Entrar", - "Logout": "Sortir", - "Not Found": "No trobat", - "of": "de", - "Page Expired": "Pàgina caducada", - "Pagination Navigation": "Pagination Navegació", - "Payment Required": "Pagament obligatori", - "Please click the button below to verify your email address.": "Si us plau, feu clic al botó inferior per verificar la vostra adreça electrònica.", - "Regards": "Salutacions", - "Register": "Registre", - "Reset Password": "Restablir contrasenya", - "Reset Password Notification": "Notificació de restabliment de contrasenya", - "results": "resultats", - "Server Error": "Error del servidor", - "Service Unavailable": "Servei no disponible", - "Showing": "Mostrant", - "The given data was invalid.": "Les dades proporcionades no eren vàlides.", - "The response is not a streamed response.": "La resposta no és una resposta en streaming.", - "The response is not a view.": "La resposta no és una visió.", - "This password reset link will expire in :count minutes.": "Aquest enllaç de restabliment de contrasenya caducarà en :count minuts.", - "to": "a", - "Toggle navigation": "Commutar navegació", - "Too Many Requests": "Massa peticions", - "Unauthorized": "No autoritzat", - "Verify Email Address": "Confirmeu la vostra adreça electrònica", - "Whoops!": "Vaja!", - "You are receiving this email because we received a password reset request for your account.": "Heu rebut aquest correu electrònic perquè s'ha solicitat el restabliment de la contrasenya per al vostre compte." -} \ No newline at end of file diff --git a/resources/lang/en.json b/resources/lang/en.json deleted file mode 100644 index f87d73a..0000000 --- a/resources/lang/en.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "(and :count more error)": "(and :count more error)", - "(and :count more errors)": "(and :count more errors)", - "All rights reserved.": "All rights reserved.", - "Forbidden": "Forbidden", - "Go to page :page": "Go to page :page", - "Hello!": "Hello!", - "If you did not create an account, no further action is required.": "If you did not create an account, no further action is required.", - "If you did not request a password reset, no further action is required.": "If you did not request a password reset, no further action is required.", - "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:", - "Invalid JSON was returned from the route.": "Invalid JSON was returned from the route.", - "Login": "Login", - "Logout": "Logout", - "Not Found": "Not Found", - "of": "of", - "Page Expired": "Page Expired", - "Pagination Navigation": "Pagination Navigation", - "Payment Required": "Payment Required", - "Please click the button below to verify your email address.": "Please click the button below to verify your email address.", - "Regards": "Regards", - "Register": "Register", - "Reset Password": "Reset Password", - "Reset Password Notification": "Reset Password Notification", - "results": "results", - "Server Error": "Server Error", - "Service Unavailable": "Service Unavailable", - "Showing": "Showing", - "The given data was invalid.": "The given data was invalid.", - "The response is not a streamed response.": "The response is not a streamed response.", - "The response is not a view.": "The response is not a view.", - "This password reset link will expire in :count minutes.": "This password reset link will expire in :count minutes.", - "to": "to", - "Toggle navigation": "Toggle navigation", - "Too Many Requests": "Too Many Requests", - "Unauthorized": "Unauthorized", - "Verify Email Address": "Verify Email Address", - "Whoops!": "Whoops!", - "You are receiving this email because we received a password reset request for your account.": "You are receiving this email because we received a password reset request for your account." -} \ No newline at end of file diff --git a/resources/lang/es.json b/resources/lang/es.json deleted file mode 100644 index 79c15f4..0000000 --- a/resources/lang/es.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "(and :count more error)": "(y :count error más)", - "(and :count more errors)": "(y :count errores más)", - "A fresh verification link has been sent to your email address.": "Se ha enviado un nuevo enlace de verificación a tu correo electrónico.", - "All rights reserved.": "Todos los derechos reservados.", - "Before proceeding, please check your email for a verification link.": "Antes de poder continuar, por favor, confirma tu correo electrónico con el enlace que te hemos enviado.", - "click here to request another": "pulsa aquí para que te enviemos otro", - "Confirm Password": "Confirmar contraseña", - "E-Mail Address": "Correo electrónico", - "Forbidden": "Prohibido", - "Forgot Your Password?": "¿Olvidaste tu contraseña?", - "Go to page :page": "Ir a la página :page", - "Hello!": "¡Hola!", - "If you did not create an account, no further action is required.": "Si no ha creado una cuenta, no se requiere ninguna acción adicional.", - "If you did not receive the email": "Si no has recibido el email", - "If you did not request a password reset, no further action is required.": "Si no ha solicitado el restablecimiento de contraseña, omita este mensaje de correo electrónico.", - "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si está teniendo problemas al hacer clic en el botón \":actionText\", copie y pegue la URL de abajo\nen su navegador web:", - "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si tienes problemas haciendo click en el botón \":actionText\", copia y pega el siguiente\nenlace en tu navegador:", - "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser: [:actionURL](:actionURL)": "Si tienes problemas haciendo click en el botón \":actionText\", copia y pega el siguiente\nenlace en tu navegador: [:actionURL](:actionURL)", - "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser: [:displayableActionUrl](:actionURL)": "Si tienes problemas haciendo click en el botón \":actionText\", copia y pega el siguiente\nenlace en tu navegador: [:displayableActionUrl](:actionURL)", - "Invalid JSON was returned from the route.": "Se devolvió un JSON no válido desde la ruta.", - "Login": "Iniciar sesión", - "Logout": "Finalizar sesión", - "Name": "Nombre", - "Not Found": "No encontrado", - "of": "de", - "Page Expired": "Página expirada", - "Pagination Navigation": "Navegación por los enlaces de paginación", - "Password": "Contraseña", - "Payment Required": "Pago requerido", - "Please click the button below to verify your email address.": "Por favor, haga clic en el botón de abajo para verificar su dirección de correo electrónico.", - "Please confirm your password before continuing.": "Por favor confirme su contraseña antes de continuar.", - "Regards": "Saludos", - "Register": "Registrarse", - "Remember Me": "Recuérdame", - "Reset Password": "Restablecer contraseña", - "Reset Password Notification": "Notificación de restablecimiento de contraseña", - "results": "resultados", - "Send Password Reset Link": "Enviar enlace para restablecer contraseña", - "Server Error": "Error del servidor", - "Service Unavailable": "Servicio no disponible", - "Showing": "Mostrando", - "The given data was invalid.": "Los datos proporcionados no son válidos.", - "The response is not a streamed response.": "La respuesta no es una respuesta transmitida.", - "The response is not a view.": "La respuesta no es una vista.", - "This password reset link will expire in :count minutes.": "Este enlace de restablecimiento de contraseña expirará en :count minutos.", - "to": "al", - "Toggle navigation": "Alternar navegación", - "Too Many Requests": "Demasiadas peticiones", - "Unauthorized": "No autorizado", - "Verify Email Address": "Confirme su correo electrónico", - "Verify Your Email Address": "Confirma tu correo electrónico", - "Whoops!": "¡Ups!", - "You are receiving this email because we received a password reset request for your account.": "Ha recibido este mensaje porque se solicitó un restablecimiento de contraseña para su cuenta." -} \ No newline at end of file diff --git a/resources/lang/fr.json b/resources/lang/fr.json deleted file mode 100644 index db9f718..0000000 --- a/resources/lang/fr.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "(and :count more error)": "(et :count erreur en plus)", - "(and :count more errors)": "(et :count erreurs en plus)", - "All rights reserved.": "Tous droits réservés.", - "Forbidden": "Interdit", - "Go to page :page": "Aller à la page :page", - "Hello!": "Bonjour !", - "If you did not create an account, no further action is required.": "Si vous n'avez pas créé de compte, vous pouvez ignorer ce message.", - "If you did not request a password reset, no further action is required.": "Si vous n'avez pas demandé de réinitialisation de mot de passe, vous pouvez ignorer ce message.", - "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si vous avez des difficultés à cliquer sur le bouton \":actionText\", copiez et collez l'URL ci-dessous\ndans votre navigateur Web :", - "Invalid JSON was returned from the route.": "Un JSON non valide a été renvoyé par la route.", - "Login": "Connexion", - "Logout": "Déconnexion", - "Not Found": "Non trouvé", - "of": "de", - "Page Expired": "Page expirée", - "Pagination Navigation": "Pagination", - "Payment Required": "Paiement requis", - "Please click the button below to verify your email address.": "Veuillez cliquer sur le bouton ci-dessous pour vérifier votre adresse e-mail :", - "Regards": "Cordialement", - "Register": "Inscription", - "Reset Password": "Réinitialisation du mot de passe", - "Reset Password Notification": "Notification de réinitialisation du mot de passe", - "results": "résultats", - "Server Error": "Erreur serveur", - "Service Unavailable": "Service indisponible", - "Showing": "Montrant", - "The given data was invalid.": "La donnée renseignée est incorrecte.", - "The response is not a streamed response.": "La réponse n'est pas une réponse diffusée.", - "The response is not a view.": "La réponse n'est pas une vue.", - "This password reset link will expire in :count minutes.": "Ce lien de réinitialisation du mot de passe expirera dans :count minutes.", - "to": "à", - "Toggle navigation": "Afficher / masquer le menu de navigation", - "Too Many Requests": "Trop de requêtes", - "Unauthorized": "Non autorisé", - "Verify Email Address": "Vérifier l'adresse e-mail", - "Whoops!": "Oups !", - "You are receiving this email because we received a password reset request for your account.": "Vous recevez cet e-mail car nous avons reçu une demande de réinitialisation de mot de passe pour votre compte." -} \ No newline at end of file diff --git a/resources/lang/fr/api.php b/resources/lang/fr/api.php deleted file mode 100644 index bb8a230..0000000 --- a/resources/lang/fr/api.php +++ /dev/null @@ -1,9 +0,0 @@ - 'Application multilingue', - 'select_locale' => 'Sélectionnez votre langue', - 'example' => 'Exemple:', - 'articles' => 'article:', - 'title' => 'Titre', - 'content' => 'Contenu', -]; \ No newline at end of file diff --git a/resources/lang/fr/auth.php b/resources/lang/fr/auth.php deleted file mode 100644 index 445c999..0000000 --- a/resources/lang/fr/auth.php +++ /dev/null @@ -1,16 +0,0 @@ - "Vous avez été bloqué.", - "email_not_verified" => "Votre email n'est pas vérifié.", - 'failed' => 'Ces identifiants ne correspondent pas à nos enregistrements.', - "success" => "L'utilisateur s'est authentifié avec succès.", - 'throttle' => 'Tentatives de connexion trop nombreuses. Veuillez essayer de nouveau dans :seconds secondes.', - 'password' => 'Le mot de passe est incorrect', - - /** Logout */ - "logout_success" => "L'utilisateur s'est déconnecté avec succès.", -]; diff --git a/resources/lang/fr/http-statuses.php b/resources/lang/fr/http-statuses.php deleted file mode 100644 index af44920..0000000 --- a/resources/lang/fr/http-statuses.php +++ /dev/null @@ -1,84 +0,0 @@ - 'Erreur inconnue', - '100' => 'Continuer', - '101' => 'Protocoles de commutation', - '102' => 'En traitement', - '200' => 'D\'accord', - '201' => 'Créé', - '202' => 'Accepté', - '203' => 'Informations non autorisées', - '204' => 'Pas content', - '205' => 'Réinitialiser le contenu', - '206' => 'Contenu partiel', - '207' => 'Multi-statut', - '208' => 'Déjà rapporté', - '226' => 'J\'ai l\'habitude', - '300' => 'Choix multiples', - '301' => 'Déplacé de façon permanente', - '302' => 'A trouvé', - '303' => 'Voir autre', - '304' => 'Non modifié', - '305' => 'Utiliser un proxy', - '307' => 'Redirection temporaire', - '308' => 'Redirection permanente', - '400' => 'Mauvaise Demande', - '401' => 'Non autorisé', - '402' => 'Paiement Requis', - '403' => 'Interdit', - '404' => 'Page non trouvée', - '405' => 'Méthode Non Autorisée', - '406' => 'Pas acceptable', - '407' => 'Authentification proxy requise', - '408' => 'Délai d\'expiration de la demande', - '409' => 'Conflit', - '410' => 'Disparu', - '411' => 'Longueur requise', - '412' => 'La précondition a échoué', - '413' => 'Charge utile trop grande', - '414' => 'URI trop long', - '415' => 'Type de support non supporté', - '416' => 'Plage non satisfaisante', - '417' => 'Échec de l\'attente', - '418' => 'Je suis une théière', - '419' => 'La session a expiré', - '421' => 'Demande mal dirigée', - '422' => 'Entité non traitable', - '423' => 'Fermé à clef', - '424' => 'Dépendance échouée', - '425' => 'Trop tôt', - '426' => 'Mise à niveau requise', - '428' => 'Condition préalable requise', - '429' => 'Trop de demandes', - '431' => 'Demander des champs d\'en-tête trop grands', - '444' => 'Connexion fermée sans réponse', - '449' => 'Réessayer avec', - '451' => 'Indisponible pour des raisons légales', - '499' => 'Demande fermée du client', - '500' => 'Erreur Interne du Serveur', - '501' => 'Pas mis en œuvre', - '502' => 'Mauvaise passerelle', - '503' => 'Mode de Maintenance', - '504' => 'Délai d\'attente de la passerelle', - '505' => 'Version HTTP non prise en charge', - '506' => 'La variante négocie également', - '507' => 'Espace insuffisant', - '508' => 'Boucle détectée', - '509' => 'Limite de bande passante dépassée', - '510' => 'Non prolongé', - '511' => 'Authentification réseau requise', - '520' => 'Erreur inconnue', - '521' => 'Le serveur Web est en panne', - '522' => 'La connexion a expiré', - '523' => 'L\'origine est inaccessible', - '524' => 'Un dépassement de délai s\'est produit', - '525' => 'Échec de la prise de contact SSL', - '526' => 'Certificat SSL invalide', - '527' => 'Erreur de canon ferroviaire', - '598' => 'Erreur de délai de lecture réseau', - '599' => 'Erreur de délai de connexion réseau', - 'unknownError' => 'Erreur inconnue', -]; diff --git a/resources/lang/fr/pagination.php b/resources/lang/fr/pagination.php deleted file mode 100644 index 225391e..0000000 --- a/resources/lang/fr/pagination.php +++ /dev/null @@ -1,8 +0,0 @@ - 'Suivant »', - 'previous' => '« Précédent', -]; diff --git a/resources/lang/fr/passwords.php b/resources/lang/fr/passwords.php deleted file mode 100644 index 75ae148..0000000 --- a/resources/lang/fr/passwords.php +++ /dev/null @@ -1,11 +0,0 @@ - 'Votre mot de passe a été réinitialisé !', - 'sent' => 'Nous vous avons envoyé par email le lien de réinitialisation du mot de passe !', - 'throttled' => 'Veuillez patienter avant de réessayer.', - 'token' => 'Ce jeton de réinitialisation du mot de passe n\'est pas valide.', - 'user' => 'Aucun utilisateur n\'a été trouvé avec cette adresse email.', -]; diff --git a/resources/lang/fr/validation.php b/resources/lang/fr/validation.php deleted file mode 100644 index 8316397..0000000 --- a/resources/lang/fr/validation.php +++ /dev/null @@ -1,217 +0,0 @@ - 'Le champ :attribute doit être accepté.', - 'accepted_if' => 'Le champ :attribute doit être accepté quand :other a la valeur :value.', - 'active_url' => 'Le champ :attribute n\'est pas une URL valide.', - 'after' => 'Le champ :attribute doit être une date postérieure au :date.', - 'after_or_equal' => 'Le champ :attribute doit être une date postérieure ou égale au :date.', - 'alpha' => 'Le champ :attribute doit contenir uniquement des lettres.', - 'alpha_dash' => 'Le champ :attribute doit contenir uniquement des lettres, des chiffres et des tirets.', - 'alpha_num' => 'Le champ :attribute doit contenir uniquement des chiffres et des lettres.', - 'array' => 'Le champ :attribute doit être un tableau.', - 'ascii' => 'Le champ :attribute ne doit contenir que des caractères alphanumériques et des symboles codés sur un octet.', - 'before' => 'Le champ :attribute doit être une date antérieure au :date.', - 'before_or_equal' => 'Le champ :attribute doit être une date antérieure ou égale au :date.', - 'between' => [ - 'array' => 'Le tableau :attribute doit contenir entre :min et :max éléments.', - 'file' => 'La taille du fichier de :attribute doit être comprise entre :min et :max kilo-octets.', - 'numeric' => 'La valeur de :attribute doit être comprise entre :min et :max.', - 'string' => 'Le texte :attribute doit contenir entre :min et :max caractères.', - ], - 'boolean' => 'Le champ :attribute doit être vrai ou faux.', - 'can' => 'Le champ :attribute contient une valeur non autorisée.', - 'confirmed' => 'Le champ de confirmation :attribute ne correspond pas.', - 'current_password' => 'Le mot de passe est incorrect.', - 'date' => 'Le champ :attribute n\'est pas une date valide.', - 'date_equals' => 'Le champ :attribute doit être une date égale à :date.', - 'date_format' => 'Le champ :attribute ne correspond pas au format :format.', - 'decimal' => 'Le champ :attribute doit comporter :decimal décimales.', - 'declined' => 'Le champ :attribute doit être décliné.', - 'declined_if' => 'Le champ :attribute doit être décliné quand :other a la valeur :value.', - 'different' => 'Les champs :attribute et :other doivent être différents.', - 'digits' => 'Le champ :attribute doit contenir :digits chiffres.', - 'digits_between' => 'Le champ :attribute doit contenir entre :min et :max chiffres.', - 'dimensions' => 'La taille de l\'image :attribute n\'est pas conforme.', - 'distinct' => 'Le champ :attribute a une valeur en double.', - 'doesnt_end_with' => 'Le champ :attribute ne doit pas finir avec une des valeurs suivantes : :values.', - 'doesnt_start_with' => 'Le champ :attribute ne doit pas commencer avec une des valeurs suivantes : :values.', - 'email' => 'Le champ :attribute doit être une adresse e-mail valide.', - 'ends_with' => 'Le champ :attribute doit se terminer par une des valeurs suivantes : :values', - 'enum' => 'Le champ :attribute sélectionné est invalide.', - 'exists' => 'Le champ :attribute sélectionné est invalide.', - 'file' => 'Le champ :attribute doit être un fichier.', - 'filled' => 'Le champ :attribute doit avoir une valeur.', - 'gt' => [ - 'array' => 'Le tableau :attribute doit contenir plus de :value éléments.', - 'file' => 'La taille du fichier de :attribute doit être supérieure à :value kilo-octets.', - 'numeric' => 'La valeur de :attribute doit être supérieure à :value.', - 'string' => 'Le texte :attribute doit contenir plus de :value caractères.', - ], - 'gte' => [ - 'array' => 'Le tableau :attribute doit contenir au moins :value éléments.', - 'file' => 'La taille du fichier de :attribute doit être supérieure ou égale à :value kilo-octets.', - 'numeric' => 'La valeur de :attribute doit être supérieure ou égale à :value.', - 'string' => 'Le texte :attribute doit contenir au moins :value caractères.', - ], - 'image' => 'Le champ :attribute doit être une image.', - 'in' => 'Le champ :attribute est invalide.', - 'in_array' => 'Le champ :attribute n\'existe pas dans :other.', - 'integer' => 'Le champ :attribute doit être un entier.', - 'ip' => 'Le champ :attribute doit être une adresse IP valide.', - 'ipv4' => 'Le champ :attribute doit être une adresse IPv4 valide.', - 'ipv6' => 'Le champ :attribute doit être une adresse IPv6 valide.', - 'json' => 'Le champ :attribute doit être un document JSON valide.', - 'lowercase' => 'Le champ :attribute doit être en minuscules.', - 'lt' => [ - 'array' => 'Le tableau :attribute doit contenir moins de :value éléments.', - 'file' => 'La taille du fichier de :attribute doit être inférieure à :value kilo-octets.', - 'numeric' => 'La valeur de :attribute doit être inférieure à :value.', - 'string' => 'Le texte :attribute doit contenir moins de :value caractères.', - ], - 'lte' => [ - 'array' => 'Le tableau :attribute doit contenir au plus :value éléments.', - 'file' => 'La taille du fichier de :attribute doit être inférieure ou égale à :value kilo-octets.', - 'numeric' => 'La valeur de :attribute doit être inférieure ou égale à :value.', - 'string' => 'Le texte :attribute doit contenir au plus :value caractères.', - ], - 'mac_address' => 'Le champ :attribute doit être une adresse MAC valide.', - 'max' => [ - 'array' => 'Le tableau :attribute ne peut pas contenir plus que :max éléments.', - 'file' => 'La taille du fichier de :attribute ne peut pas dépasser :max kilo-octets.', - 'numeric' => 'La valeur de :attribute ne peut pas être supérieure à :max.', - 'string' => 'Le texte de :attribute ne peut pas contenir plus de :max caractères.', - ], - 'max_digits' => 'Le champ :attribute ne doit pas avoir plus de :max chiffres.', - 'mimes' => 'Le champ :attribute doit être un fichier de type : :values.', - 'mimetypes' => 'Le champ :attribute doit être un fichier de type : :values.', - 'min' => [ - 'array' => 'Le tableau :attribute doit contenir au moins :min éléments.', - 'file' => 'La taille du fichier de :attribute doit être supérieure ou égale à :min kilo-octets.', - 'numeric' => 'La valeur de :attribute doit être supérieure ou égale à :min.', - 'string' => 'Le texte de :attribute doit contenir au moins :min caractères.', - ], - 'min_digits' => 'Le champ :attribute doit avoir au moins :min chiffres.', - 'missing' => 'Le champ :attribute doit être manquant.', - 'missing_if' => 'Le champ :attribute doit être manquant quand :other a la valeur :value.', - 'missing_unless' => 'Le champ :attribute doit être manquant sauf si :other a la valeur :value.', - 'missing_with' => 'Le champ :attribute doit être manquant quand :values est présent.', - 'missing_with_all' => 'Le champ :attribute doit être manquant quand :values sont présents.', - 'multiple_of' => 'La valeur de :attribute doit être un multiple de :value', - 'not_in' => 'Le champ :attribute sélectionné n\'est pas valide.', - 'not_regex' => 'Le format du champ :attribute n\'est pas valide.', - 'numeric' => 'Le champ :attribute doit contenir un nombre.', - 'password' => [ - 'letters' => 'Le champ :attribute doit contenir au moins une lettre.', - 'mixed' => 'Le champ :attribute doit contenir au moins une majuscule et une minuscule.', - 'numbers' => 'Le champ :attribute doit contenir au moins un chiffre.', - 'symbols' => 'Le champ :attribute doit contenir au moins un symbole.', - 'uncompromised' => 'La valeur du champ :attribute est apparue dans une fuite de données. Veuillez choisir une valeur différente.', - ], - 'present' => 'Le champ :attribute doit être présent.', - 'prohibited' => 'Le champ :attribute est interdit.', - 'prohibited_if' => 'Le champ :attribute est interdit quand :other a la valeur :value.', - 'prohibited_unless' => 'Le champ :attribute est interdit à moins que :other est l\'une des valeurs :values.', - 'prohibits' => 'Le champ :attribute interdit :other d\'être présent.', - 'regex' => 'Le format du champ :attribute est invalide.', - 'required' => 'Le champ :attribute est obligatoire.', - 'required_array_keys' => 'Le champ :attribute doit contenir des entrées pour : :values.', - 'required_if' => 'Le champ :attribute est obligatoire quand la valeur de :other est :value.', - 'required_if_accepted' => 'Le champ :attribute est obligatoire quand le champ :other a été accepté.', - 'required_unless' => 'Le champ :attribute est obligatoire sauf si :other est :values.', - 'required_with' => 'Le champ :attribute est obligatoire quand :values est présent.', - 'required_with_all' => 'Le champ :attribute est obligatoire quand :values sont présents.', - 'required_without' => 'Le champ :attribute est obligatoire quand :values n\'est pas présent.', - 'required_without_all' => 'Le champ :attribute est requis quand aucun de :values n\'est présent.', - 'same' => 'Les champs :attribute et :other doivent être identiques.', - 'size' => [ - 'array' => 'Le tableau :attribute doit contenir :size éléments.', - 'file' => 'La taille du fichier de :attribute doit être de :size kilo-octets.', - 'numeric' => 'La valeur de :attribute doit être :size.', - 'string' => 'Le texte de :attribute doit contenir :size caractères.', - ], - 'starts_with' => 'Le champ :attribute doit commencer avec une des valeurs suivantes : :values', - 'string' => 'Le champ :attribute doit être une chaîne de caractères.', - 'timezone' => 'Le champ :attribute doit être un fuseau horaire valide.', - 'ulid' => 'Le champ :attribute doit être un ULID valide.', - 'unique' => 'La valeur du champ :attribute est déjà utilisée.', - 'uploaded' => 'Le fichier du champ :attribute n\'a pu être téléversé.', - 'uppercase' => 'Le champ :attribute doit être en majuscules.', - 'url' => 'Le format de l\'URL de :attribute n\'est pas valide.', - 'uuid' => 'Le champ :attribute doit être un UUID valide', - 'attributes' => [ - 'address' => 'adresse', - 'age' => 'âge', - 'amount' => 'montant', - 'area' => 'zone', - 'available' => 'disponible', - 'birthday' => 'anniversaire', - 'body' => 'corps', - 'city' => 'ville', - 'content' => 'contenu', - 'country' => 'pays', - 'created_at' => 'créé à', - 'creator' => 'créateur', - 'current_password' => 'mot de passe actuel', - 'date' => 'Date', - 'date_of_birth' => 'date de naissance', - 'day' => 'jour', - 'deleted_at' => 'supprimé à', - 'description' => 'la description', - 'district' => 'quartier', - 'duration' => 'durée', - 'email' => 'adresse e-mail', - 'excerpt' => 'extrait', - 'filter' => 'filtre', - 'first_name' => 'prénom', - 'gender' => 'genre', - 'group' => 'groupe', - 'hour' => 'heure', - 'image' => 'image', - 'last_name' => 'nom', - 'lesson' => 'leçon', - 'line_address_1' => 'ligne d\'adresse 1', - 'line_address_2' => 'ligne d\'adresse 2', - 'message' => 'message', - 'middle_name' => 'deuxième prénom', - 'minute' => 'minute', - 'mobile' => 'portable', - 'month' => 'mois', - 'name' => 'nom', - 'national_code' => 'code national', - 'number' => 'numéro', - 'password' => 'mot de passe', - 'password_confirmation' => 'confirmation du mot de passe', - 'phone' => 'téléphone', - 'photo' => 'photo', - 'postal_code' => 'code postal', - 'price' => 'prix', - 'province' => 'région', - 'recaptcha_response_field' => 'champ de réponse recaptcha', - 'remember' => 'se souvenir', - 'restored_at' => 'restauré à', - 'result_text_under_image' => 'texte de résultat sous l\'image', - 'role' => 'rôle', - 'second' => 'seconde', - 'sex' => 'sexe', - 'short_text' => 'texte court', - 'size' => 'taille', - 'state' => 'état', - 'street' => 'rue', - 'student' => 'étudiant', - 'subject' => 'sujet', - 'teacher' => 'professeur', - 'terms' => 'conditions', - 'test_description' => 'description test', - 'test_locale' => 'localisation test', - 'test_name' => 'nom test', - 'text' => 'texte', - 'time' => 'heure', - 'title' => 'titre', - 'updated_at' => 'mis à jour à', - 'username' => 'nom d\'utilisateur', - 'year' => 'année', - ], -]; From 4108dcc9b417b72fed6b2fd0a348eb6fbb69c0bd Mon Sep 17 00:00:00 2001 From: Edvenan Date: Wed, 4 Oct 2023 17:48:36 +0200 Subject: [PATCH 10/33] Installed Laravel-Translatable pkg and Localization lang files --- composer.json | 3 +- composer.lock | 1022 +++++++++++++----------------------- config/translatable.php | 8 +- resources/lang/ca/api.php | 13 + resources/lang/ca/auth.php | 21 +- resources/lang/en/api.php | 12 + resources/lang/en/auth.php | 8 + resources/lang/es/api.php | 14 + resources/lang/es/auth.php | 16 + 9 files changed, 437 insertions(+), 680 deletions(-) diff --git a/composer.json b/composer.json index dd841bc..c3228db 100644 --- a/composer.json +++ b/composer.json @@ -13,8 +13,7 @@ "laravel/passport": "^11.8", "laravel/sanctum": "^3.2", "laravel/tinker": "^2.8", - "laraveles/spanish": "^1.5", - "spatie/laravel-translatable": "^6.5" + "laraveles/spanish": "^1.5" }, "require-dev": { "fakerphp/faker": "^1.9.1", diff --git a/composer.lock b/composer.lock index c85f231..91c98f7 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": "f6de6de1d83a9ab498db1dc5345022fc", + "content-hash": "81a424b3538c7a20fbf6c48f1c6f6b84", "packages": [ { "name": "astrotomic/laravel-translatable", @@ -1348,16 +1348,16 @@ }, { "name": "laravel/framework", - "version": "v10.23.1", + "version": "v10.26.2", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "dbfd495557678759153e8d71cc2f6027686ca51e" + "reference": "6e5440f7c518f26b4495e5d7e4796ec239e26df9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/dbfd495557678759153e8d71cc2f6027686ca51e", - "reference": "dbfd495557678759153e8d71cc2f6027686ca51e", + "url": "https://api.github.com/repos/laravel/framework/zipball/6e5440f7c518f26b4495e5d7e4796ec239e26df9", + "reference": "6e5440f7c518f26b4495e5d7e4796ec239e26df9", "shasum": "" }, "require": { @@ -1375,7 +1375,7 @@ "ext-tokenizer": "*", "fruitcake/php-cors": "^1.2", "guzzlehttp/uri-template": "^1.0", - "laravel/prompts": "^0.1", + "laravel/prompts": "^0.1.9", "laravel/serializable-closure": "^1.3", "league/commonmark": "^2.2.1", "league/flysystem": "^3.8.0", @@ -1457,7 +1457,7 @@ "league/flysystem-read-only": "^3.3", "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.5.1", - "orchestra/testbench-core": "^8.10", + "orchestra/testbench-core": "^8.12", "pda/pheanstalk": "^4.0", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.0.7", @@ -1544,25 +1544,25 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-09-13T14:51:46+00:00" + "time": "2023-10-03T14:24:20+00:00" }, { "name": "laravel/passport", - "version": "v11.8.4", + "version": "v11.9.1", "source": { "type": "git", "url": "https://github.com/laravel/passport.git", - "reference": "b6b68fad1d02e39c6c659705159487f643393cdd" + "reference": "93bb9c36045fe5be2eaeacf35e836c00b392b761" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/passport/zipball/b6b68fad1d02e39c6c659705159487f643393cdd", - "reference": "b6b68fad1d02e39c6c659705159487f643393cdd", + "url": "https://api.github.com/repos/laravel/passport/zipball/93bb9c36045fe5be2eaeacf35e836c00b392b761", + "reference": "93bb9c36045fe5be2eaeacf35e836c00b392b761", "shasum": "" }, "require": { "ext-json": "*", - "firebase/php-jwt": "^6.3.1", + "firebase/php-jwt": "^6.4", "illuminate/auth": "^9.0|^10.0", "illuminate/console": "^9.0|^10.0", "illuminate/container": "^9.0|^10.0", @@ -1572,12 +1572,12 @@ "illuminate/encryption": "^9.0|^10.0", "illuminate/http": "^9.0|^10.0", "illuminate/support": "^9.0|^10.0", - "lcobucci/jwt": "^3.4|^4.0", - "league/oauth2-server": "^8.2", - "nyholm/psr7": "^1.3", + "lcobucci/jwt": "^4.3|^5.0", + "league/oauth2-server": "^8.5.3", + "nyholm/psr7": "^1.5", "php": "^8.0", "phpseclib/phpseclib": "^2.0|^3.0", - "symfony/psr-http-message-bridge": "^2.0" + "symfony/psr-http-message-bridge": "^2.1" }, "require-dev": { "mockery/mockery": "^1.0", @@ -1622,20 +1622,20 @@ "issues": "https://github.com/laravel/passport/issues", "source": "https://github.com/laravel/passport" }, - "time": "2023-03-18T18:55:20+00:00" + "time": "2023-09-01T14:20:24+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.7", + "version": "v0.1.11", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "554e7d855a22e87942753d68e23b327ad79b2070" + "reference": "cce65a90e64712909ea1adc033e1d88de8455ffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/554e7d855a22e87942753d68e23b327ad79b2070", - "reference": "554e7d855a22e87942753d68e23b327ad79b2070", + "url": "https://api.github.com/repos/laravel/prompts/zipball/cce65a90e64712909ea1adc033e1d88de8455ffd", + "reference": "cce65a90e64712909ea1adc033e1d88de8455ffd", "shasum": "" }, "require": { @@ -1644,6 +1644,10 @@ "php": "^8.1", "symfony/console": "^6.2" }, + "conflict": { + "illuminate/console": ">=10.17.0 <10.25.0", + "laravel/framework": ">=10.17.0 <10.25.0" + }, "require-dev": { "mockery/mockery": "^1.5", "pestphp/pest": "^2.3", @@ -1654,6 +1658,11 @@ "ext-pcntl": "Required for the spinner to be animated." }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.1.x-dev" + } + }, "autoload": { "files": [ "src/helpers.php" @@ -1668,9 +1677,9 @@ ], "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.7" + "source": "https://github.com/laravel/prompts/tree/v0.1.11" }, - "time": "2023-09-12T11:09:22+00:00" + "time": "2023-10-03T01:07:35+00:00" }, { "name": "laravel/sanctum", @@ -1933,102 +1942,36 @@ }, "time": "2020-06-30T06:01:43+00:00" }, - { - "name": "laraveles/spanish", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/Laraveles/spanish.git", - "reference": "2224e3db7ec399952523b0769a7677de0b6afd8b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Laraveles/spanish/zipball/2224e3db7ec399952523b0769a7677de0b6afd8b", - "reference": "2224e3db7ec399952523b0769a7677de0b6afd8b", - "shasum": "" - }, - "require": { - "illuminate/console": ">=5.4.0", - "illuminate/support": ">=5.4.0", - "php": ">=5.6" - }, - "require-dev": { - "orchestra/testbench": "^3.4|^4.0", - "phpunit/phpunit": "^5.6|^6.3|^7.0|^8.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Laraveles\\Spanish\\SpanishServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Laraveles\\Spanish\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Israel Ortuño", - "email": "ai.ortuno@gmail.com" - }, - { - "name": "Cesar Garcia", - "email": "cesargb@gmail.com", - "homepage": "https://github.com/cesargb", - "role": "Developer" - } - ], - "description": "Conjunto de traducciones en español para Laravel", - "homepage": "https://github.com/Laraveles/spanish", - "keywords": [ - "laravel", - "laraveles", - "spanish", - "traduccion" - ], - "support": { - "issues": "https://github.com/Laraveles/spanish/issues", - "source": "https://github.com/Laraveles/spanish/tree/master" - }, - "time": "2020-06-30T06:01:43+00:00" - }, { "name": "lcobucci/clock", - "version": "2.3.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/lcobucci/clock.git", - "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876" + "reference": "30a854ceb22bd87d83a7a4563b3f6312453945fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/clock/zipball/c7aadcd6fd97ed9e199114269c0be3f335e38876", - "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/30a854ceb22bd87d83a7a4563b3f6312453945fc", + "reference": "30a854ceb22bd87d83a7a4563b3f6312453945fc", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0", - "stella-maris/clock": "^0.1.7" + "php": "~8.2.0", + "psr/clock": "^1.0" }, "provide": { "psr/clock-implementation": "1.0" }, "require-dev": { "infection/infection": "^0.26", - "lcobucci/coding-standard": "^9.0", + "lcobucci/coding-standard": "^10.0.0", "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-deprecation-rules": "^1.1.1", - "phpstan/phpstan-phpunit": "^1.3.2", - "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^9.5.27" + "phpstan/phpstan": "^1.10.7", + "phpstan/phpstan-deprecation-rules": "^1.1.3", + "phpstan/phpstan-phpunit": "^1.3.10", + "phpstan/phpstan-strict-rules": "^1.5.0", + "phpunit/phpunit": "^10.0.17" }, "type": "library", "autoload": { @@ -2049,7 +1992,7 @@ "description": "Yet another clock abstraction", "support": { "issues": "https://github.com/lcobucci/clock/issues", - "source": "https://github.com/lcobucci/clock/tree/2.3.0" + "source": "https://github.com/lcobucci/clock/tree/3.1.0" }, "funding": [ { @@ -2061,47 +2004,46 @@ "type": "patreon" } ], - "time": "2022-12-19T14:38:11+00:00" + "time": "2023-03-20T19:12:25+00:00" }, { "name": "lcobucci/jwt", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/lcobucci/jwt.git", - "reference": "55564265fddf810504110bd68ca311932324b0e9" + "reference": "47bdb0e0b5d00c2f89ebe33e7e384c77e84e7c34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/55564265fddf810504110bd68ca311932324b0e9", - "reference": "55564265fddf810504110bd68ca311932324b0e9", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/47bdb0e0b5d00c2f89ebe33e7e384c77e84e7c34", + "reference": "47bdb0e0b5d00c2f89ebe33e7e384c77e84e7c34", "shasum": "" }, "require": { - "ext-mbstring": "*", + "ext-hash": "*", + "ext-json": "*", "ext-openssl": "*", - "lcobucci/clock": "^2.0", - "php": "^7.4 || ^8.0" + "ext-sodium": "*", + "php": "~8.1.0 || ~8.2.0", + "psr/clock": "^1.0" }, "require-dev": { - "infection/infection": "^0.20", - "lcobucci/coding-standard": "^6.0", - "mikey179/vfsstream": "^1.6", - "phpbench/phpbench": "^0.17", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-deprecation-rules": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/php-invoker": "^3.1", - "phpunit/phpunit": "^9.4" + "infection/infection": "^0.26.19", + "lcobucci/clock": "^3.0", + "lcobucci/coding-standard": "^9.0", + "phpbench/phpbench": "^1.2.8", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.10.3", + "phpstan/phpstan-deprecation-rules": "^1.1.2", + "phpstan/phpstan-phpunit": "^1.3.8", + "phpstan/phpstan-strict-rules": "^1.5.0", + "phpunit/phpunit": "^10.0.12" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } + "suggest": { + "lcobucci/clock": ">= 3.0" }, + "type": "library", "autoload": { "psr-4": { "Lcobucci\\JWT\\": "src" @@ -2125,7 +2067,7 @@ ], "support": { "issues": "https://github.com/lcobucci/jwt/issues", - "source": "https://github.com/lcobucci/jwt/tree/4.0.4" + "source": "https://github.com/lcobucci/jwt/tree/5.0.0" }, "funding": [ { @@ -2137,7 +2079,7 @@ "type": "patreon" } ], - "time": "2021-09-28T19:18:28+00:00" + "time": "2023-02-25T21:35:16+00:00" }, { "name": "league/commonmark", @@ -2589,37 +2531,37 @@ }, { "name": "league/oauth2-server", - "version": "8.4.2", + "version": "8.5.4", "source": { "type": "git", "url": "https://github.com/thephpleague/oauth2-server.git", - "reference": "007dc5f6c0151a73b133fec36c9686cc956209d3" + "reference": "ab7714d073844497fd222d5d0a217629089936bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/007dc5f6c0151a73b133fec36c9686cc956209d3", - "reference": "007dc5f6c0151a73b133fec36c9686cc956209d3", + "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/ab7714d073844497fd222d5d0a217629089936bc", + "reference": "ab7714d073844497fd222d5d0a217629089936bc", "shasum": "" }, "require": { - "defuse/php-encryption": "^2.2.1", - "ext-json": "*", + "defuse/php-encryption": "^2.3", "ext-openssl": "*", - "lcobucci/jwt": "^3.4.6 || ^4.0.4", + "lcobucci/clock": "^2.2 || ^3.0", + "lcobucci/jwt": "^4.3 || ^5.0", "league/event": "^2.2", - "league/uri": "^6.4", - "php": "^7.2 || ^8.0", - "psr/http-message": "^1.0.1" + "league/uri": "^6.7 || ^7.0", + "php": "^8.0", + "psr/http-message": "^1.0.1 || ^2.0" }, "replace": { "league/oauth2server": "*", "lncd/oauth2": "*" }, "require-dev": { - "laminas/laminas-diactoros": "^2.4.1", + "laminas/laminas-diactoros": "^3.0.0", "phpstan/phpstan": "^0.12.57", "phpstan/phpstan-phpunit": "^0.12.16", - "phpunit/phpunit": "^8.5.13", + "phpunit/phpunit": "^9.6.6", "roave/security-advisories": "dev-master" }, "type": "library", @@ -2665,7 +2607,7 @@ ], "support": { "issues": "https://github.com/thephpleague/oauth2-server/issues", - "source": "https://github.com/thephpleague/oauth2-server/tree/8.4.2" + "source": "https://github.com/thephpleague/oauth2-server/tree/8.5.4" }, "funding": [ { @@ -2673,58 +2615,48 @@ "type": "github" } ], - "time": "2023-08-02T22:54:39+00:00" + "time": "2023-08-25T22:35:12+00:00" }, { "name": "league/uri", - "version": "6.8.0", + "version": "7.3.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39" + "reference": "36743c3961bb82bf93da91917b6bced0358a8d45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/a700b4656e4c54371b799ac61e300ab25a2d1d39", - "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/36743c3961bb82bf93da91917b6bced0358a8d45", + "reference": "36743c3961bb82bf93da91917b6bced0358a8d45", "shasum": "" }, "require": { - "ext-json": "*", - "league/uri-interfaces": "^2.3", - "php": "^8.1", - "psr/http-message": "^1.0.1" + "league/uri-interfaces": "^7.3", + "php": "^8.1" }, "conflict": { "league/uri-schemes": "^1.0" }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^v3.9.5", - "nyholm/psr7": "^1.5.1", - "php-http/psr7-integration-tests": "^1.1.1", - "phpbench/phpbench": "^1.2.6", - "phpstan/phpstan": "^1.8.5", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.1.1", - "phpstan/phpstan-strict-rules": "^1.4.3", - "phpunit/phpunit": "^9.5.24", - "psr/http-factory": "^1.0.1" - }, "suggest": { - "ext-fileinfo": "Needed to create Data URI from a filepath", - "ext-intl": "Needed to improve host validation", - "league/uri-components": "Needed to easily manipulate URI objects", - "psr/http-factory": "Needed to use the URI factory" + "ext-bcmath": "to improve IPV4 host parsing", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", + "league/uri-components": "Needed to easily manipulate URI objects components", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { "psr-4": { - "League\\Uri\\": "src" + "League\\Uri\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2764,8 +2696,8 @@ "support": { "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", - "issues": "https://github.com/thephpleague/uri/issues", - "source": "https://github.com/thephpleague/uri/tree/6.8.0" + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri/tree/7.3.0" }, "funding": [ { @@ -2773,46 +2705,44 @@ "type": "github" } ], - "time": "2022-09-13T19:58:47+00:00" + "time": "2023-09-09T17:21:43+00:00" }, { "name": "league/uri-interfaces", - "version": "2.3.0", + "version": "7.3.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383" + "reference": "c409b60ed2245ff94c965a8c798a60166db53361" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", - "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/c409b60ed2245ff94c965a8c798a60166db53361", + "reference": "c409b60ed2245ff94c965a8c798a60166db53361", "shasum": "" }, "require": { - "ext-json": "*", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.19", - "phpstan/phpstan": "^0.12.90", - "phpstan/phpstan-phpunit": "^0.12.19", - "phpstan/phpstan-strict-rules": "^0.12.9", - "phpunit/phpunit": "^8.5.15 || ^9.5" + "ext-filter": "*", + "php": "^8.1", + "psr/http-factory": "^1", + "psr/http-message": "^1.1 || ^2.0" }, "suggest": { - "ext-intl": "to use the IDNA feature", - "symfony/intl": "to use the IDNA feature via Symfony Polyfill" + "ext-bcmath": "to improve IPV4 host parsing", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { "psr-4": { - "League\\Uri\\": "src/" + "League\\Uri\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2826,17 +2756,32 @@ "homepage": "https://nyamsprod.com" } ], - "description": "Common interface for URI representation", - "homepage": "http://github.com/thephpleague/uri-interfaces", + "description": "Common interfaces and classes for URI representation and interaction", + "homepage": "https://uri.thephpleague.com", "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", "rfc3986", "rfc3987", + "rfc6570", "uri", - "url" + "url", + "ws" ], "support": { - "issues": "https://github.com/thephpleague/uri-interfaces/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/2.3.0" + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.3.0" }, "funding": [ { @@ -2844,7 +2789,7 @@ "type": "github" } ], - "time": "2021-06-28T04:27:21+00:00" + "time": "2023-09-09T17:21:43+00:00" }, { "name": "monolog/monolog", @@ -2949,16 +2894,16 @@ }, { "name": "nesbot/carbon", - "version": "2.70.0", + "version": "2.71.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "d3298b38ea8612e5f77d38d1a99438e42f70341d" + "reference": "98276233188583f2ff845a0f992a235472d9466a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d3298b38ea8612e5f77d38d1a99438e42f70341d", - "reference": "d3298b38ea8612e5f77d38d1a99438e42f70341d", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/98276233188583f2ff845a0f992a235472d9466a", + "reference": "98276233188583f2ff845a0f992a235472d9466a", "shasum": "" }, "require": { @@ -3051,7 +2996,7 @@ "type": "tidelift" } ], - "time": "2023-09-07T16:43:50+00:00" + "time": "2023-09-25T11:31:05+00:00" }, { "name": "nette/schema", @@ -3117,16 +3062,16 @@ }, { "name": "nette/utils", - "version": "v4.0.1", + "version": "v4.0.2", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "9124157137da01b1f5a5a22d6486cb975f26db7e" + "reference": "cead6637226456b35e1175cc53797dd585d85545" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/9124157137da01b1f5a5a22d6486cb975f26db7e", - "reference": "9124157137da01b1f5a5a22d6486cb975f26db7e", + "url": "https://api.github.com/repos/nette/utils/zipball/cead6637226456b35e1175cc53797dd585d85545", + "reference": "cead6637226456b35e1175cc53797dd585d85545", "shasum": "" }, "require": { @@ -3148,8 +3093,7 @@ "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", "ext-json": "to use Nette\\Utils\\Json", "ext-mbstring": "to use Strings::lower() etc...", - "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()", - "ext-xml": "to use Strings::length() etc. when mbstring is not available" + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()" }, "type": "library", "extra": { @@ -3198,9 +3142,9 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.1" + "source": "https://github.com/nette/utils/tree/v4.0.2" }, - "time": "2023-07-30T15:42:21+00:00" + "time": "2023-09-19T11:58:07+00:00" }, { "name": "nikic/php-parser", @@ -3616,16 +3560,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.22", + "version": "3.0.23", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "b6bd1c5f79b2c39e144770eb6d9180fbdb00d09b" + "reference": "866cc78fbd82462ffd880e3f65692afe928bed50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/b6bd1c5f79b2c39e144770eb6d9180fbdb00d09b", - "reference": "b6bd1c5f79b2c39e144770eb6d9180fbdb00d09b", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/866cc78fbd82462ffd880e3f65692afe928bed50", + "reference": "866cc78fbd82462ffd880e3f65692afe928bed50", "shasum": "" }, "require": { @@ -3706,7 +3650,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.22" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.23" }, "funding": [ { @@ -3722,7 +3666,7 @@ "type": "tidelift" } ], - "time": "2023-09-16T11:49:37+00:00" + "time": "2023-09-18T17:22:01+00:00" }, { "name": "psr/cache", @@ -3926,16 +3870,16 @@ }, { "name": "psr/http-client", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { @@ -3972,9 +3916,9 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/1.0.2" + "source": "https://github.com/php-fig/http-client" }, - "time": "2023-04-10T20:12:12+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", @@ -4033,16 +3977,16 @@ }, { "name": "psr/http-message", - "version": "1.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { @@ -4051,7 +3995,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -4066,7 +4010,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -4080,9 +4024,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/log", @@ -4187,16 +4131,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.20", + "version": "v0.11.21", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "0fa27040553d1d280a67a4393194df5228afea5b" + "reference": "bcb22101107f3bf770523b65630c9d547f60c540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/0fa27040553d1d280a67a4393194df5228afea5b", - "reference": "0fa27040553d1d280a67a4393194df5228afea5b", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/bcb22101107f3bf770523b65630c9d547f60c540", + "reference": "bcb22101107f3bf770523b65630c9d547f60c540", "shasum": "" }, "require": { @@ -4226,6 +4170,10 @@ "extra": { "branch-alias": { "dev-main": "0.11.x-dev" + }, + "bamarni-bin": { + "bin-links": false, + "forward-command": false } }, "autoload": { @@ -4257,9 +4205,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.20" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.21" }, - "time": "2023-07-31T14:32:22+00:00" + "time": "2023-09-17T21:15:54+00:00" }, { "name": "ralouphie/getallheaders", @@ -4486,207 +4434,18 @@ ], "time": "2023-04-15T23:01:58+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": "spatie/laravel-translatable", - "version": "6.5.3", - "source": { - "type": "git", - "url": "https://github.com/spatie/laravel-translatable.git", - "reference": "1906a3f1492c4b4b99d9f150b67cca4b697d85d7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-translatable/zipball/1906a3f1492c4b4b99d9f150b67cca4b697d85d7", - "reference": "1906a3f1492c4b4b99d9f150b67cca4b697d85d7", - "shasum": "" - }, - "require": { - "illuminate/database": "^9.0|^10.0", - "illuminate/support": "^9.0|^10.0", - "php": "^8.0", - "spatie/laravel-package-tools": "^1.11" - }, - "require-dev": { - "mockery/mockery": "^1.4", - "orchestra/testbench": "^7.0|^8.0", - "pestphp/pest": "^1.20" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Spatie\\Translatable\\TranslatableServiceProvider" - ] - }, - "aliases": { - "Translatable": "Spatie\\Translatable\\Facades\\Translatable" - } - }, - "autoload": { - "psr-4": { - "Spatie\\Translatable\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://spatie.be", - "role": "Developer" - }, - { - "name": "Sebastian De Deyne", - "email": "sebastian@spatie.be", - "homepage": "https://spatie.be", - "role": "Developer" - } - ], - "description": "A trait to make an Eloquent model hold translations", - "homepage": "https://github.com/spatie/laravel-translatable", - "keywords": [ - "eloquent", - "i8n", - "laravel-translatable", - "model", - "multilingual", - "spatie", - "translate" - ], - "support": { - "issues": "https://github.com/spatie/laravel-translatable/issues", - "source": "https://github.com/spatie/laravel-translatable/tree/6.5.3" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2023-07-19T19:21:38+00:00" - }, - { - "name": "stella-maris/clock", - "version": "0.1.7", - "source": { - "type": "git", - "url": "https://github.com/stella-maris-solutions/clock.git", - "reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/stella-maris-solutions/clock/zipball/fa23ce16019289a18bb3446fdecd45befcdd94f8", - "reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8", - "shasum": "" - }, - "require": { - "php": "^7.0|^8.0", - "psr/clock": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "StellaMaris\\Clock\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Heigl", - "role": "Maintainer" - } - ], - "description": "A pre-release of the proposed PSR-20 Clock-Interface", - "homepage": "https://gitlab.com/stella-maris/clock", - "keywords": [ - "clock", - "datetime", - "point in time", - "psr20" - ], - "support": { - "source": "https://github.com/stella-maris-solutions/clock/tree/0.1.7" - }, - "time": "2022-11-25T16:15:06+00:00" - }, { "name": "swagger-api/swagger-ui", - "version": "v5.7.1", + "version": "v5.9.0", "source": { "type": "git", "url": "https://github.com/swagger-api/swagger-ui.git", - "reference": "597a8ae366f1ba913b5fd5840036888527de8fd9" + "reference": "cbfc3e949d3d9e2b71d566fb722cb3970036f593" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/597a8ae366f1ba913b5fd5840036888527de8fd9", - "reference": "597a8ae366f1ba913b5fd5840036888527de8fd9", + "url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/cbfc3e949d3d9e2b71d566fb722cb3970036f593", + "reference": "cbfc3e949d3d9e2b71d566fb722cb3970036f593", "shasum": "" }, "type": "library", @@ -4732,9 +4491,9 @@ ], "support": { "issues": "https://github.com/swagger-api/swagger-ui/issues", - "source": "https://github.com/swagger-api/swagger-ui/tree/v5.7.1" + "source": "https://github.com/swagger-api/swagger-ui/tree/v5.9.0" }, - "time": "2023-09-14T11:52:21+00:00" + "time": "2023-09-29T12:27:07+00:00" }, { "name": "symfony/console", @@ -4960,16 +4719,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.3.2", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "85fd65ed295c4078367c784e8a5a6cee30348b7a" + "reference": "1f69476b64fb47105c06beef757766c376b548c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/85fd65ed295c4078367c784e8a5a6cee30348b7a", - "reference": "85fd65ed295c4078367c784e8a5a6cee30348b7a", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/1f69476b64fb47105c06beef757766c376b548c4", + "reference": "1f69476b64fb47105c06beef757766c376b548c4", "shasum": "" }, "require": { @@ -5014,7 +4773,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.3.2" + "source": "https://github.com/symfony/error-handler/tree/v6.3.5" }, "funding": [ { @@ -5030,7 +4789,7 @@ "type": "tidelift" } ], - "time": "2023-07-16T17:05:46+00:00" + "time": "2023-09-12T06:57:20+00:00" }, { "name": "symfony/event-dispatcher", @@ -5190,16 +4949,16 @@ }, { "name": "symfony/finder", - "version": "v6.3.3", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e" + "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9915db259f67d21eefee768c1abcf1cc61b1fc9e", - "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e", + "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4", + "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4", "shasum": "" }, "require": { @@ -5234,7 +4993,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.3" + "source": "https://github.com/symfony/finder/tree/v6.3.5" }, "funding": [ { @@ -5250,20 +5009,20 @@ "type": "tidelift" } ], - "time": "2023-07-31T08:31:44+00:00" + "time": "2023-09-26T12:56:25+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.3.4", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "cac1556fdfdf6719668181974104e6fcfa60e844" + "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/cac1556fdfdf6719668181974104e6fcfa60e844", - "reference": "cac1556fdfdf6719668181974104e6fcfa60e844", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b50f5e281d722cb0f4c296f908bacc3e2b721957", + "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957", "shasum": "" }, "require": { @@ -5311,7 +5070,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.3.4" + "source": "https://github.com/symfony/http-foundation/tree/v6.3.5" }, "funding": [ { @@ -5327,20 +5086,20 @@ "type": "tidelift" } ], - "time": "2023-08-22T08:20:46+00:00" + "time": "2023-09-04T21:33:54+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.3.4", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb" + "reference": "9f991a964368bee8d883e8d57ced4fe9fff04dfc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb", - "reference": "36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f991a964368bee8d883e8d57ced4fe9fff04dfc", + "reference": "9f991a964368bee8d883e8d57ced4fe9fff04dfc", "shasum": "" }, "require": { @@ -5424,7 +5183,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.3.4" + "source": "https://github.com/symfony/http-kernel/tree/v6.3.5" }, "funding": [ { @@ -5440,20 +5199,20 @@ "type": "tidelift" } ], - "time": "2023-08-26T13:54:49+00:00" + "time": "2023-09-30T06:37:04+00:00" }, { "name": "symfony/mailer", - "version": "v6.3.0", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "7b03d9be1dea29bfec0a6c7b603f5072a4c97435" + "reference": "d89611a7830d51b5e118bca38e390dea92f9ea06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/7b03d9be1dea29bfec0a6c7b603f5072a4c97435", - "reference": "7b03d9be1dea29bfec0a6c7b603f5072a4c97435", + "url": "https://api.github.com/repos/symfony/mailer/zipball/d89611a7830d51b5e118bca38e390dea92f9ea06", + "reference": "d89611a7830d51b5e118bca38e390dea92f9ea06", "shasum": "" }, "require": { @@ -5504,7 +5263,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.3.0" + "source": "https://github.com/symfony/mailer/tree/v6.3.5" }, "funding": [ { @@ -5520,20 +5279,20 @@ "type": "tidelift" } ], - "time": "2023-05-29T12:49:39+00:00" + "time": "2023-09-06T09:47:15+00:00" }, { "name": "symfony/mime", - "version": "v6.3.3", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "9a0cbd52baa5ba5a5b1f0cacc59466f194730f98" + "reference": "d5179eedf1cb2946dbd760475ebf05c251ef6a6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/9a0cbd52baa5ba5a5b1f0cacc59466f194730f98", - "reference": "9a0cbd52baa5ba5a5b1f0cacc59466f194730f98", + "url": "https://api.github.com/repos/symfony/mime/zipball/d5179eedf1cb2946dbd760475ebf05c251ef6a6e", + "reference": "d5179eedf1cb2946dbd760475ebf05c251ef6a6e", "shasum": "" }, "require": { @@ -5588,7 +5347,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.3.3" + "source": "https://github.com/symfony/mime/tree/v6.3.5" }, "funding": [ { @@ -5604,7 +5363,7 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2023-09-29T06:59:36+00:00" }, { "name": "symfony/polyfill-ctype", @@ -6496,16 +6255,16 @@ }, { "name": "symfony/routing", - "version": "v6.3.3", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "e7243039ab663822ff134fbc46099b5fdfa16f6a" + "reference": "82616e59acd3e3d9c916bba798326cb7796d7d31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/e7243039ab663822ff134fbc46099b5fdfa16f6a", - "reference": "e7243039ab663822ff134fbc46099b5fdfa16f6a", + "url": "https://api.github.com/repos/symfony/routing/zipball/82616e59acd3e3d9c916bba798326cb7796d7d31", + "reference": "82616e59acd3e3d9c916bba798326cb7796d7d31", "shasum": "" }, "require": { @@ -6559,7 +6318,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.3.3" + "source": "https://github.com/symfony/routing/tree/v6.3.5" }, "funding": [ { @@ -6575,7 +6334,7 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2023-09-20T16:05:51+00:00" }, { "name": "symfony/service-contracts", @@ -6661,16 +6420,16 @@ }, { "name": "symfony/string", - "version": "v6.3.2", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "53d1a83225002635bca3482fcbf963001313fb68" + "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/53d1a83225002635bca3482fcbf963001313fb68", - "reference": "53d1a83225002635bca3482fcbf963001313fb68", + "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", + "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", "shasum": "" }, "require": { @@ -6727,7 +6486,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.2" + "source": "https://github.com/symfony/string/tree/v6.3.5" }, "funding": [ { @@ -6743,7 +6502,7 @@ "type": "tidelift" } ], - "time": "2023-07-05T08:41:27+00:00" + "time": "2023-09-18T10:38:32+00:00" }, { "name": "symfony/translation", @@ -6994,16 +6753,16 @@ }, { "name": "symfony/var-dumper", - "version": "v6.3.4", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "2027be14f8ae8eae999ceadebcda5b4909b81d45" + "reference": "3d9999376be5fea8de47752837a3e1d1c5f69ef5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2027be14f8ae8eae999ceadebcda5b4909b81d45", - "reference": "2027be14f8ae8eae999ceadebcda5b4909b81d45", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3d9999376be5fea8de47752837a3e1d1c5f69ef5", + "reference": "3d9999376be5fea8de47752837a3e1d1c5f69ef5", "shasum": "" }, "require": { @@ -7058,7 +6817,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.3.4" + "source": "https://github.com/symfony/var-dumper/tree/v6.3.5" }, "funding": [ { @@ -7074,7 +6833,7 @@ "type": "tidelift" } ], - "time": "2023-08-24T14:51:05+00:00" + "time": "2023-09-12T10:11:35+00:00" }, { "name": "symfony/yaml", @@ -7545,16 +7304,16 @@ }, { "name": "composer/semver", - "version": "3.3.2", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { @@ -7604,9 +7363,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/3.4.0" }, "funding": [ { @@ -7622,7 +7381,7 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2023-08-31T09:50:34+00:00" }, { "name": "dragon-code/contracts", @@ -7775,16 +7534,16 @@ }, { "name": "dragon-code/support", - "version": "v6.11.2", + "version": "v6.11.3", "source": { "type": "git", "url": "https://github.com/TheDragonCode/support.git", - "reference": "81b4432f35ee5d1d7a310669ccc698d78b3e83a6" + "reference": "3dbf1715e83e216ae1fea31eecc022829dc864df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/TheDragonCode/support/zipball/81b4432f35ee5d1d7a310669ccc698d78b3e83a6", - "reference": "81b4432f35ee5d1d7a310669ccc698d78b3e83a6", + "url": "https://api.github.com/repos/TheDragonCode/support/zipball/3dbf1715e83e216ae1fea31eecc022829dc864df", + "reference": "3dbf1715e83e216ae1fea31eecc022829dc864df", "shasum": "" }, "require": { @@ -7861,6 +7620,10 @@ "url": "https://boosty.to/dragon-code", "type": "boosty" }, + { + "url": "https://www.donationalerts.com/r/dragon_code", + "type": "donationalerts" + }, { "url": "https://github.com/sponsors/TheDragonCode", "type": "github" @@ -7874,7 +7637,7 @@ "type": "yoomoney" } ], - "time": "2023-04-19T08:29:55+00:00" + "time": "2023-08-03T09:43:52+00:00" }, { "name": "fakerphp/faker", @@ -8068,16 +7831,16 @@ }, { "name": "laravel-lang/attributes", - "version": "v2.3.3", + "version": "v2.4.1", "source": { "type": "git", "url": "https://github.com/Laravel-Lang/attributes.git", - "reference": "866473306491d9b84d37dfbb80193ce8099368ad" + "reference": "c3dce4766cac85fc7430b634d14065e811d691bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Laravel-Lang/attributes/zipball/866473306491d9b84d37dfbb80193ce8099368ad", - "reference": "866473306491d9b84d37dfbb80193ce8099368ad", + "url": "https://api.github.com/repos/Laravel-Lang/attributes/zipball/c3dce4766cac85fc7430b634d14065e811d691bf", + "reference": "c3dce4766cac85fc7430b634d14065e811d691bf", "shasum": "" }, "require": { @@ -8086,8 +7849,8 @@ "php": "^8.1" }, "require-dev": { - "laravel-lang/status-generator": "^1.3", - "phpunit/phpunit": "^9.6", + "laravel-lang/status-generator": "^1.19", + "phpunit/phpunit": "^10.0", "symfony/var-dumper": "^6.0" }, "type": "library", @@ -8131,7 +7894,7 @@ ], "support": { "issues": "https://github.com/Laravel-Lang/attributes/issues", - "source": "https://github.com/Laravel-Lang/attributes/tree/v2.3.3" + "source": "https://github.com/Laravel-Lang/attributes/tree/v2.4.1" }, "funding": [ { @@ -8139,7 +7902,7 @@ "type": "open_collective" } ], - "time": "2023-04-03T16:25:20+00:00" + "time": "2023-09-15T20:14:52+00:00" }, { "name": "laravel-lang/common", @@ -8216,16 +7979,16 @@ }, { "name": "laravel-lang/http-statuses", - "version": "v3.3.1", + "version": "v3.4.5", "source": { "type": "git", "url": "https://github.com/Laravel-Lang/http-statuses.git", - "reference": "5d9770879bf279dfe10b4f50e370c615be65541a" + "reference": "03e50c7f3629e28786e37ea8b8c9da14eab311fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Laravel-Lang/http-statuses/zipball/5d9770879bf279dfe10b4f50e370c615be65541a", - "reference": "5d9770879bf279dfe10b4f50e370c615be65541a", + "url": "https://api.github.com/repos/Laravel-Lang/http-statuses/zipball/03e50c7f3629e28786e37ea8b8c9da14eab311fb", + "reference": "03e50c7f3629e28786e37ea8b8c9da14eab311fb", "shasum": "" }, "require": { @@ -8237,8 +8000,8 @@ "laravel-lang/publisher": "<14.0" }, "require-dev": { - "laravel-lang/status-generator": "^1.3.4", - "phpunit/phpunit": "^9.6", + "laravel-lang/status-generator": "^1.19", + "phpunit/phpunit": "^10.0", "symfony/var-dumper": "^6.0" }, "type": "library", @@ -8280,7 +8043,7 @@ ], "support": { "issues": "https://github.com/Laravel-Lang/http-statuses/issues", - "source": "https://github.com/Laravel-Lang/http-statuses/tree/v3.3.1" + "source": "https://github.com/Laravel-Lang/http-statuses/tree/v3.4.5" }, "funding": [ { @@ -8288,20 +8051,20 @@ "type": "open_collective" } ], - "time": "2023-04-03T16:25:01+00:00" + "time": "2023-09-14T01:14:10+00:00" }, { "name": "laravel-lang/lang", - "version": "12.24.1", + "version": "12.24.2", "source": { "type": "git", "url": "https://github.com/Laravel-Lang/lang.git", - "reference": "e253e448432100aed7d18a20983b0f5a36909f36" + "reference": "5a6a3e7751a91dec3ee7d69c12db4690643d59a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Laravel-Lang/lang/zipball/e253e448432100aed7d18a20983b0f5a36909f36", - "reference": "e253e448432100aed7d18a20983b0f5a36909f36", + "url": "https://api.github.com/repos/Laravel-Lang/lang/zipball/5a6a3e7751a91dec3ee7d69c12db4690643d59a0", + "reference": "5a6a3e7751a91dec3ee7d69c12db4690643d59a0", "shasum": "" }, "require": { @@ -8354,20 +8117,20 @@ "type": "open_collective" } ], - "time": "2023-07-23T21:20:12+00:00" + "time": "2023-07-25T22:28:42+00:00" }, { "name": "laravel-lang/publisher", - "version": "v14.6.4", + "version": "v14.7.0", "source": { "type": "git", "url": "https://github.com/Laravel-Lang/publisher.git", - "reference": "a6df495f4c8bb7e8555cfbf82070bd417fbef9bb" + "reference": "4e6fa2d8c446282b832ffb16b9b3c33aa4296a5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Laravel-Lang/publisher/zipball/a6df495f4c8bb7e8555cfbf82070bd417fbef9bb", - "reference": "a6df495f4c8bb7e8555cfbf82070bd417fbef9bb", + "url": "https://api.github.com/repos/Laravel-Lang/publisher/zipball/4e6fa2d8c446282b832ffb16b9b3c33aa4296a5b", + "reference": "4e6fa2d8c446282b832ffb16b9b3c33aa4296a5b", "shasum": "" }, "require": { @@ -8376,8 +8139,8 @@ "dragon-code/pretty-array": "^4.0", "dragon-code/support": "^6.3", "ext-json": "*", - "illuminate/console": "^8.79 || ^9.18 || ^10.0", - "illuminate/support": "^8.79 || ^9.18 || ^10.0", + "illuminate/console": "^8.79 || ^9.18 || ^10.0 || ^11.0", + "illuminate/support": "^8.79 || ^9.18 || ^10.0 || ^11.0", "league/commonmark": "^2.3", "league/config": "^1.2", "php": "^8.1" @@ -8389,8 +8152,8 @@ }, "require-dev": { "laravel-lang/json-fallback-hotfix": "^1.0", - "orchestra/testbench": "^6.25 || ^7.22 || ^8.0", - "phpunit/phpunit": "^9.6", + "orchestra/testbench": "^6.25 || ^7.22 || ^8.0 || ^9.0", + "phpunit/phpunit": "^9.6 || ^10.0", "symfony/var-dumper": "^5.0 || ^6.0" }, "suggest": { @@ -8461,20 +8224,20 @@ "type": "open_collective" } ], - "time": "2023-03-31T14:18:17+00:00" + "time": "2023-08-09T09:09:57+00:00" }, { "name": "laravel/pint", - "version": "v1.13.1", + "version": "v1.13.2", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "22f204242d68095b3ba7dab5d3ef0240454a4652" + "reference": "bbb13460d7f8c5c0cd9a58109beedd79cd7331ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/22f204242d68095b3ba7dab5d3ef0240454a4652", - "reference": "22f204242d68095b3ba7dab5d3ef0240454a4652", + "url": "https://api.github.com/repos/laravel/pint/zipball/bbb13460d7f8c5c0cd9a58109beedd79cd7331ff", + "reference": "bbb13460d7f8c5c0cd9a58109beedd79cd7331ff", "shasum": "" }, "require": { @@ -8485,13 +8248,13 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.21.1", - "illuminate/view": "^10.5.1", + "friendsofphp/php-cs-fixer": "^3.26.1", + "illuminate/view": "^10.23.1", "laravel-zero/framework": "^10.1.2", - "mockery/mockery": "^1.5.1", - "nunomaduro/larastan": "^2.5.1", + "mockery/mockery": "^1.6.6", + "nunomaduro/larastan": "^2.6.4", "nunomaduro/termwind": "^1.15.1", - "pestphp/pest": "^2.4.0" + "pestphp/pest": "^2.18.2" }, "bin": [ "builds/pint" @@ -8527,7 +8290,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2023-09-06T11:03:34+00:00" + "time": "2023-09-19T15:55:02+00:00" }, { "name": "laravel/sail", @@ -8740,37 +8503,37 @@ }, { "name": "nunomaduro/collision", - "version": "v7.8.1", + "version": "v7.9.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "61553ad3260845d7e3e49121b7074619233d361b" + "reference": "296d0cf9fe462837ac0da8a568b56fc026b132da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/61553ad3260845d7e3e49121b7074619233d361b", - "reference": "61553ad3260845d7e3e49121b7074619233d361b", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/296d0cf9fe462837ac0da8a568b56fc026b132da", + "reference": "296d0cf9fe462837ac0da8a568b56fc026b132da", "shasum": "" }, "require": { "filp/whoops": "^2.15.3", "nunomaduro/termwind": "^1.15.1", "php": "^8.1.0", - "symfony/console": "^6.3.2" + "symfony/console": "^6.3.4" }, "require-dev": { - "brianium/paratest": "^7.2.4", - "laravel/framework": "^10.17.1", - "laravel/pint": "^1.10.5", - "laravel/sail": "^1.23.1", - "laravel/sanctum": "^3.2.5", - "laravel/tinker": "^2.8.1", + "brianium/paratest": "^7.2.7", + "laravel/framework": "^10.23.1", + "laravel/pint": "^1.13.1", + "laravel/sail": "^1.25.0", + "laravel/sanctum": "^3.3.1", + "laravel/tinker": "^2.8.2", "nunomaduro/larastan": "^2.6.4", - "orchestra/testbench-core": "^8.5.9", - "pestphp/pest": "^2.12.1", - "phpunit/phpunit": "^10.3.1", + "orchestra/testbench-core": "^8.11.0", + "pestphp/pest": "^2.19.1", + "phpunit/phpunit": "^10.3.5", "sebastian/environment": "^6.0.1", - "spatie/laravel-ignition": "^2.2.0" + "spatie/laravel-ignition": "^2.3.0" }, "type": "library", "extra": { @@ -8829,7 +8592,7 @@ "type": "patreon" } ], - "time": "2023-08-07T08:03:21+00:00" + "time": "2023-09-19T10:45:09+00:00" }, { "name": "phar-io/manifest", @@ -8944,16 +8707,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.5", + "version": "10.1.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "1df504e42a88044c27a90136910f0b3fe9e91939" + "reference": "56f33548fe522c8d82da7ff3824b42829d324364" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1df504e42a88044c27a90136910f0b3fe9e91939", - "reference": "1df504e42a88044c27a90136910f0b3fe9e91939", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/56f33548fe522c8d82da7ff3824b42829d324364", + "reference": "56f33548fe522c8d82da7ff3824b42829d324364", "shasum": "" }, "require": { @@ -9010,7 +8773,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.5" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.6" }, "funding": [ { @@ -9018,7 +8781,7 @@ "type": "github" } ], - "time": "2023-09-12T14:37:22+00:00" + "time": "2023-09-19T04:59:03+00:00" }, { "name": "phpunit/php-file-iterator", @@ -9265,16 +9028,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.3.4", + "version": "10.3.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b8d59476f19115c9774b3b447f78131781c6c32b" + "reference": "747c3b2038f1139e3dcd9886a3f5a948648b7503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b8d59476f19115c9774b3b447f78131781c6c32b", - "reference": "b8d59476f19115c9774b3b447f78131781c6c32b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/747c3b2038f1139e3dcd9886a3f5a948648b7503", + "reference": "747c3b2038f1139e3dcd9886a3f5a948648b7503", "shasum": "" }, "require": { @@ -9298,7 +9061,7 @@ "sebastian/comparator": "^5.0", "sebastian/diff": "^5.0", "sebastian/environment": "^6.0", - "sebastian/exporter": "^5.0", + "sebastian/exporter": "^5.1", "sebastian/global-state": "^6.0.1", "sebastian/object-enumerator": "^5.0", "sebastian/recursion-context": "^5.0", @@ -9346,7 +9109,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.3.4" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.3.5" }, "funding": [ { @@ -9362,7 +9125,7 @@ "type": "tidelift" } ], - "time": "2023-09-12T14:42:28+00:00" + "time": "2023-09-19T05:42:37+00:00" }, { "name": "sebastian/cli-parser", @@ -9610,16 +9373,16 @@ }, { "name": "sebastian/complexity", - "version": "3.0.1", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "c70b73893e10757af9c6a48929fa6a333b56a97a" + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/c70b73893e10757af9c6a48929fa6a333b56a97a", - "reference": "c70b73893e10757af9c6a48929fa6a333b56a97a", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68cfb347a44871f01e33ab0ef8215966432f6957", + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957", "shasum": "" }, "require": { @@ -9632,7 +9395,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.1-dev" } }, "autoload": { @@ -9656,7 +9419,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/complexity/tree/3.1.0" }, "funding": [ { @@ -9664,7 +9427,7 @@ "type": "github" } ], - "time": "2023-08-31T09:55:53+00:00" + "time": "2023-09-28T11:50:59+00:00" }, { "name": "sebastian/diff", @@ -9799,16 +9562,16 @@ }, { "name": "sebastian/exporter", - "version": "5.0.1", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "32ff03d078fed1279c4ec9a407d08c5e9febb480" + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/32ff03d078fed1279c4ec9a407d08c5e9febb480", - "reference": "32ff03d078fed1279c4ec9a407d08c5e9febb480", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc", + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc", "shasum": "" }, "require": { @@ -9822,7 +9585,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -9865,7 +9628,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.0.1" + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1" }, "funding": [ { @@ -9873,7 +9636,7 @@ "type": "github" } ], - "time": "2023-09-08T04:46:58+00:00" + "time": "2023-09-24T13:22:09+00:00" }, { "name": "sebastian/global-state", @@ -10413,16 +10176,16 @@ }, { "name": "spatie/ignition", - "version": "1.10.1", + "version": "1.11.2", "source": { "type": "git", "url": "https://github.com/spatie/ignition.git", - "reference": "d92b9a081e99261179b63a858c7a4b01541e7dd1" + "reference": "48b23411ca4bfbc75c75dfc638b6b36159c375aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/d92b9a081e99261179b63a858c7a4b01541e7dd1", - "reference": "d92b9a081e99261179b63a858c7a4b01541e7dd1", + "url": "https://api.github.com/repos/spatie/ignition/zipball/48b23411ca4bfbc75c75dfc638b6b36159c375aa", + "reference": "48b23411ca4bfbc75c75dfc638b6b36159c375aa", "shasum": "" }, "require": { @@ -10492,7 +10255,7 @@ "type": "github" } ], - "time": "2023-08-21T15:06:37+00:00" + "time": "2023-09-19T15:29:52+00:00" }, { "name": "spatie/laravel-ignition", @@ -10588,95 +10351,16 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/polyfill-php81", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", "shasum": "" }, "require": { @@ -10685,7 +10369,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -10726,7 +10410,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, "funding": [ { @@ -10742,7 +10426,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "theseer/tokenizer", diff --git a/config/translatable.php b/config/translatable.php index 3ba56a2..dd5f8f4 100644 --- a/config/translatable.php +++ b/config/translatable.php @@ -12,12 +12,8 @@ */ 'locales' => [ 'ca', - 'en', - 'fr', - 'es' => [ - 'MX', // mexican spanish - 'CO', // colombian spanish - ], + 'es' +, ], /* diff --git a/resources/lang/ca/api.php b/resources/lang/ca/api.php index fd4e5e5..366aedc 100644 --- a/resources/lang/ca/api.php +++ b/resources/lang/ca/api.php @@ -6,4 +6,17 @@ 'articles' => 'Articles:', 'title' => 'Títol', 'content' => 'Contingut', + + /** Collaborators */ + 'invalid_area' => 'Aquesta àrea no és vàlida.', + + /** App */ + 'app_deleted' => 'App eliminada correctament.', + 'app_not_found' => 'App no trobada a la base de dades.', + 'app_updated' => 'App actualitzada correctament.', + + /** Faq */ + 'faq_deleted' => 'Faq eliminada correctament.', + 'faq_not_found' => 'Faq no trobada a la base de dades.', + 'faq_updated' => 'Faq actualitzada correctament.', ]; \ No newline at end of file diff --git a/resources/lang/ca/auth.php b/resources/lang/ca/auth.php index 8d7e7a6..cf34465 100644 --- a/resources/lang/ca/auth.php +++ b/resources/lang/ca/auth.php @@ -3,7 +3,22 @@ declare(strict_types=1); return [ - 'failed' => 'Aquestes credencials no concorden amb els nostres registres.', - 'password' => 'La contrasenya és incorrecta.', - 'throttle' => 'Ha superat el nombre màxim d\'intents d\'accés. Si us plau, torni a intentar-ho en :seconds segons.', + /** Code */ + 'unauthorized' => 'Usuari no autoritzat.', + 'sent' => 'Email and codi de registre enviat correctament.', + + /** Register */ + 'registered' => 'Usuari creat satisfactoriament.', + 'invalid_code' => 'Codi de registre no vàlid.', + + /** Login */ + "blocked" => "L'usuari ha esta bloquejat.", + "email_not_verified" => "El seu correu no ha estat verificat.", + 'failed' => 'Aquestes credencials no concorden amb els nostres registres.', + "success" => "Usuari autenticat amb éxit.", + 'password' => 'La contrasenya és incorrecta.', + 'throttle' => 'Ha superat el nombre màxim d\'intents d\'accés. Si us plau, torni a intentar-ho en :seconds segons.', + + /** Logout */ + "logout_success" => "Usuari desautenticat amb éxit." ]; diff --git a/resources/lang/en/api.php b/resources/lang/en/api.php index 0a4bda8..e446f2b 100644 --- a/resources/lang/en/api.php +++ b/resources/lang/en/api.php @@ -7,4 +7,16 @@ 'title' => 'Title', 'content' => 'Content', + /** Collaborators */ + 'invalid_area' => 'This area is not valid.', + + /** App */ + 'app_deleted' => 'App deleted successfully.', + 'app_not_found' => 'App no found in the database.', + 'app_updated' => 'App updated successfully.', + + /** Faq */ + 'Faq_deleted' => 'Faq deleted successfully.', + 'faq_not_found' => 'Faq no found in the database.', + 'faq_updated' => 'Faq updated successfully.', ]; \ No newline at end of file diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php index 70fd682..b6c94aa 100644 --- a/resources/lang/en/auth.php +++ b/resources/lang/en/auth.php @@ -3,6 +3,14 @@ declare(strict_types=1); return [ + /** Code */ + 'unauthorized' => 'Unauthorized user.', + 'sent' => 'Email including registry code sent out successfully.', + + /** Register */ + 'registered' => 'User created successfully.', + 'invalid_code' => 'Invalid register code.', + /** Login */ "blocked" => "You have been blocked.", "email_not_verified" => "Your email is not verified.", diff --git a/resources/lang/es/api.php b/resources/lang/es/api.php index feba5e3..6ee1a1a 100644 --- a/resources/lang/es/api.php +++ b/resources/lang/es/api.php @@ -6,4 +6,18 @@ 'articles' => 'Artículos', 'title' => 'Título', 'content' => 'Contenido', + + /** Collaborators */ + 'invalid_area' => 'Esta área no es válida.', + + /** App */ + 'app_deleted' => 'App eliminada correctamente.', + 'app_not_found' => 'App no existe en la base de datos.', + 'app_updated' => 'App actualizada correctamente.', + + /** Faq */ + 'Faq_deleted' => 'Faq eliminada correctamente.', + 'faq_not_found' => 'Faq no existe en la base de datos.', + 'faq_updated' => 'Faq actualizada correctamente.', + ]; \ No newline at end of file diff --git a/resources/lang/es/auth.php b/resources/lang/es/auth.php index 888279b..9af6311 100644 --- a/resources/lang/es/auth.php +++ b/resources/lang/es/auth.php @@ -3,7 +3,23 @@ declare(strict_types=1); return [ + /** Code */ + 'unauthorized' => 'Usuario no autorizado.', + 'sent' => 'Email con código de registro enviado correctamente.', + + /** Register */ + 'registered' => 'Usuario creado satisfactoriamente.', + 'invalid_code' => 'Código de registro no válido.', + + /** Login */ + 'blocked' => 'El usuario ha sido bloqueado.', + 'email_not_verified' => 'Su correo no ha sido verificado.', 'failed' => 'Estas credenciales no coinciden con nuestros registros.', + 'success' => 'Usuario autenticado satisfactoriamente.', 'password' => 'La contraseña es incorrecta.', 'throttle' => 'Demasiados intentos de acceso. Por favor intente nuevamente en :seconds segundos.', + + /** Logout */ + 'logout_success' => 'Usuario desatenticado satisfactoriamente.' + ]; From e580809d83cfcc2dc4a67d7fcafecceb3b368c9b Mon Sep 17 00:00:00 2001 From: Edvenan Date: Wed, 4 Oct 2023 17:50:24 +0200 Subject: [PATCH 11/33] Updated SetLocale Middleware --- app/Http/Kernel.php | 8 +------- app/Http/Middleware/SetLocale.php | 4 ++-- routes/api.php | 11 +++++------ 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index c48551e..6923e34 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -44,9 +44,6 @@ class Kernel extends HttpKernel // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', \Illuminate\Routing\Middleware\SubstituteBindings::class, - //\App\Http\Middleware\Localization::class, - //'setLocale' => \App\Http\Middleware\SetLocale::class, - //\App\Http\Middleware\SetApiLocale::class, \App\Http\Middleware\SetLocale::class, \App\Http\Middleware\TranslateDatabaseValues::class, ], @@ -70,10 +67,7 @@ class Kernel extends HttpKernel 'signed' => \App\Http\Middleware\ValidateSignature::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, + 'SetLocale' => \App\Http\Middleware\SetLocale::class, ]; - protected $routeMiddleware = [ - //... - 'localization' => Localization::class, - ]; } diff --git a/app/Http/Middleware/SetLocale.php b/app/Http/Middleware/SetLocale.php index 4e5b259..3824e32 100644 --- a/app/Http/Middleware/SetLocale.php +++ b/app/Http/Middleware/SetLocale.php @@ -16,12 +16,12 @@ class SetLocale * * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next */ - public function handle($request, Closure $next) + public function handle(Request $request, Closure $next):response { if (in_array($request->header('Accept-Language'), config('app.supported_locales'))) { App::setLocale($request->header('Accept-Language')); - + Session::put('locale', $request->header('Accept-Language')); } else { diff --git a/routes/api.php b/routes/api.php index 4ef60b9..79063c7 100644 --- a/routes/api.php +++ b/routes/api.php @@ -8,8 +8,7 @@ use App\Http\Controllers\api\CodeController; use App\Http\Controllers\api\AppController; use App\Http\Controllers\api\CollaboratorsController; -use App\Http\Middleware\Localization; -use App\Http\Controllers\api\ForgetController; + /* |-------------------------------------------------------------------------- | API Routes @@ -20,7 +19,7 @@ | be assigned to the "api" middleware group. Make something great! | */ -Route::middleware("Setlocale")->group(function () { +Route::middleware(['SetLocale'])->group(function () { Route::post('/register', [UserController::class, 'store'])->name('register'); Route::post('/login', [AuthController::class, 'login'])->name('login'); @@ -37,9 +36,9 @@ Route::middleware(['auth:api'])->prefix('faqs')->group(function () { - Route::get('/{id}', [FaqController::class, 'show']); - Route::post('/', [FaqController::class, 'store']); - Route::put('/{id}', [FaqController::class, 'update']); + Route::get('/{id}', [FaqController::class, 'show'])->name('faq.show'); + Route::post('/', [FaqController::class, 'store'])->name('faq.store'); + Route::put('/{id}', [FaqController::class, 'update'])->name('faq.update'); Route::delete('/{id}', [FaqController::class, 'destroy']); }); From db635aa0005b18ad20dbc877aa4a865e067a3799 Mon Sep 17 00:00:00 2001 From: Edvenan Date: Wed, 4 Oct 2023 17:51:17 +0200 Subject: [PATCH 12/33] Configured Default and Supported locales --- config/app.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/app.php b/config/app.php index 2545d22..96ae390 100644 --- a/config/app.php +++ b/config/app.php @@ -97,7 +97,7 @@ 'fallback_locale' => 'ca', - 'supported_locales' => ['ca', 'es', 'fr', 'en'], + 'supported_locales' => ['ca', 'es'], /* |-------------------------------------------------------------------------- @@ -110,7 +110,7 @@ | */ - 'faker_locale' => 'en_US', + 'faker_locale' => 'es', /* |-------------------------------------------------------------------------- @@ -197,7 +197,6 @@ App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, L5Swagger\L5SwaggerServiceProvider::class, - Spatie\Translatable\TranslatableServiceProvider::class, ], /* From de48ca8948cac3afaa784902c299ac454908f865 Mon Sep 17 00:00:00 2001 From: Edvenan Date: Wed, 4 Oct 2023 17:52:21 +0200 Subject: [PATCH 13/33] Refactored Models and Migrations to implement Multilanguage --- app/Models/App.php | 12 +++++++----- app/Models/AppTranslation.php | 10 ++++++++++ app/Models/Faq.php | 18 ++++++------------ app/Models/FaqTranslation.php | 10 ++++++++++ .../2023_05_25_093101_create_faqs_table.php | 1 - .../2023_05_25_093121_create_apps_table.php | 16 +++++++++------- 6 files changed, 42 insertions(+), 25 deletions(-) create mode 100644 app/Models/AppTranslation.php create mode 100644 app/Models/FaqTranslation.php diff --git a/app/Models/App.php b/app/Models/App.php index 23008ba..23a6a27 100644 --- a/app/Models/App.php +++ b/app/Models/App.php @@ -4,7 +4,8 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; -use Spatie\Translatable\HasTranslations; +use Astrotomic\Translatable\Contracts\Translatable as TranslatableContract; +use Astrotomic\Translatable\Translatable; /** * @OA\Schema( @@ -63,9 +64,10 @@ * ) * ) */ -class App extends Model +class App extends Model implements TranslatableContract { - use HasFactory, HasTranslations; - protected $translatable = ['title', 'description']; - protected $fillable = ['title', 'description', 'url', 'github', 'state']; + use HasFactory,Translatable; + + public $translatedAttributes = ['title', 'description']; + protected $fillable = ['url', 'github', 'state']; } diff --git a/app/Models/AppTranslation.php b/app/Models/AppTranslation.php new file mode 100644 index 0000000..4f6ed55 --- /dev/null +++ b/app/Models/AppTranslation.php @@ -0,0 +1,10 @@ + */ - protected $translatable = ['title', 'description']; - protected $fillable = [ - 'title', - 'description', - 'locale' - ]; + protected $translatedAttributes = ['title', 'description']; + protected $fillable = ['title', 'description']; } diff --git a/app/Models/FaqTranslation.php b/app/Models/FaqTranslation.php new file mode 100644 index 0000000..52b40e9 --- /dev/null +++ b/app/Models/FaqTranslation.php @@ -0,0 +1,10 @@ +id(); - $table->string('locale')->index(); $table->timestamps(); }); diff --git a/database/migrations/2023_05_25_093121_create_apps_table.php b/database/migrations/2023_05_25_093121_create_apps_table.php index 9146bb0..5433df0 100644 --- a/database/migrations/2023_05_25_093121_create_apps_table.php +++ b/database/migrations/2023_05_25_093121_create_apps_table.php @@ -1,7 +1,9 @@ id(); - $table->string('locale')->index(); - $table->text('url'); + $table->increments('id'); + $table->string('url'); $table->enum('state', ['COMPLETED', 'IN PROGRESS', 'SOON']); $table->timestamps(); }); Schema::create('app_translations', function (Blueprint $table) { - $table->id(); - $table->foreignId('app_id')->constrained('apps')->onDelete('cascade'); + $table->increments('id'); + $table->integer('app_id')->unsigned(); + $table->string('locale')->index(); $table->string('title'); $table->text('description'); - $table->string('locale')->index(); - + $table->unique(['app_id', 'locale']); + $table->foreign('app_id')->references('id')->on('apps')->onDelete('cascade'); }); } From d188871213661416af80244e8491ffcbc5202df1 Mon Sep 17 00:00:00 2001 From: Edvenan Date: Wed, 4 Oct 2023 17:53:00 +0200 Subject: [PATCH 14/33] Refactored Controllers to implement Localization and Multilanguage --- app/Http/Controllers/api/AppController.php | 52 +++++++++++++++---- app/Http/Controllers/api/AuthController.php | 4 +- app/Http/Controllers/api/CodeController.php | 4 +- .../api/CollaboratorsController.php | 2 +- app/Http/Controllers/api/FaqController.php | 46 ++++++++-------- app/Http/Controllers/api/UserController.php | 21 ++++---- 6 files changed, 78 insertions(+), 51 deletions(-) diff --git a/app/Http/Controllers/api/AppController.php b/app/Http/Controllers/api/AppController.php index b81f9c1..d3c8abb 100644 --- a/app/Http/Controllers/api/AppController.php +++ b/app/Http/Controllers/api/AppController.php @@ -5,6 +5,8 @@ use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\Models\App; +use Astrotomic\Translatable\Validation\RuleFactory; + class AppController extends Controller { @@ -75,14 +77,20 @@ public function index() public function store(Request $request) { $validatedData = $request->validate([ - 'title' => 'required|max:255', - 'description' => 'required', 'url' => 'required|url', 'github' => 'required|url', 'state' => 'required|in:COMPLETED,IN PROGRESS,SOON', ]); + $rules = RuleFactory::make([ + '%title%' => ['required', 'string', 'max:255'], + '%description%' => ['required_with:"%title%"', 'string'], + ]); + + $validatedData += $request->validate($rules); + $app = App::create($validatedData); + return response()->json($app, 201); } @@ -111,7 +119,12 @@ public function store(Request $request) */ public function show($id) { - $app = App::findOrFail($id); + $app = App::find($id); + + if (!$app) { + return response()->json(['error' => __('api.app_not_found')], 404); + } + return response()->json($app); } @@ -170,17 +183,27 @@ public function show($id) public function update(Request $request, $id) { - $app = App::findOrFail($id); + $app = App::find($id); + + if (!$app) { + return response()->json(['error' => __('api.app_not_found')], 404); + } $validatedData = $request->validate([ - 'title' => 'required|max:255', - 'description' => 'required', - 'url' => 'required|url', - 'state' => 'required|in:COMPLETED,IN PROGRESS,SOON', + 'url' => 'url', + 'github' => 'url', + 'state' => 'in:COMPLETED,IN PROGRESS,SOON', + ]); + + $rules = RuleFactory::make([ + '%title%' => ['string', 'max:255'], + '%description%' => ['string'], ]); + + $validatedData += $request->validate($rules); $app->update($validatedData); - return response()->json($app, 200); + return response()->json(['message' => __('api.app_updated')], 200); } /** @@ -209,7 +232,14 @@ public function update(Request $request, $id) public function destroy($id) { - $app = App::findOrFail($id)->delete(); - return response()->json(['message' => 'Deleted successfully']); + $app = App::find($id); + + if (!$app) { + return response()->json(['error' => __('api.app_not_found')], 404); + } + + $app->delete(); + + return response()->json(['message' => __('api.app_deleted')]); } } diff --git a/app/Http/Controllers/api/AuthController.php b/app/Http/Controllers/api/AuthController.php index 07bc4dc..6f6e6a7 100644 --- a/app/Http/Controllers/api/AuthController.php +++ b/app/Http/Controllers/api/AuthController.php @@ -59,9 +59,9 @@ public function login(Request $request) $user = Auth::user(); $token = $user->createToken('authToken')->accessToken; - return response()->json(['result' => ['message' => 'Logged in successfully!', 'access_token' => $token], 'status' => true]); + return response()->json(['result' => ['message' => __('auth.success'), 'access_token' => $token], 'status' => true]); } else { - return response()->json(['result' => ['message' => 'Invalid credentials'], 'status' => false], 401); + return response()->json(['result' => ['message' => __('auth:failed')], 'status' => false], 401); } } diff --git a/app/Http/Controllers/api/CodeController.php b/app/Http/Controllers/api/CodeController.php index b861a12..c71fe11 100644 --- a/app/Http/Controllers/api/CodeController.php +++ b/app/Http/Controllers/api/CodeController.php @@ -93,7 +93,7 @@ public function generateRandomCode() public function sendCodeByEmail(Request $request) { if (Auth::user()->role !== 'ADMIN') { - return response()->json(['status' => false, 'message' => 'Unauthorized'], 401); + return response()->json(['status' => false, 'message' => __('auth.unauthorized')], 401); } $validEmail = Validator::make($request->all(), [ @@ -106,7 +106,7 @@ public function sendCodeByEmail(Request $request) }else{ $emailAddress = $request->input('email'); Mail::to($emailAddress)->send(new MailableCode($this->store())); - return response()->json(['status' => true, 'message' => 'Email sent successfully']); + return response()->json(['status' => true, 'message' => __('auth.sent')]); } } } \ No newline at end of file diff --git a/app/Http/Controllers/api/CollaboratorsController.php b/app/Http/Controllers/api/CollaboratorsController.php index 52dbbd6..ba2b545 100644 --- a/app/Http/Controllers/api/CollaboratorsController.php +++ b/app/Http/Controllers/api/CollaboratorsController.php @@ -67,7 +67,7 @@ public function index($area) return $this->collaboratorItaChallenges(); } return response()->json([ - 'message' => 'this area is invalid' + 'message' => __('api.invalid_area') ],404); } diff --git a/app/Http/Controllers/api/FaqController.php b/app/Http/Controllers/api/FaqController.php index 2a3089a..9bdde1f 100644 --- a/app/Http/Controllers/api/FaqController.php +++ b/app/Http/Controllers/api/FaqController.php @@ -5,6 +5,7 @@ use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\Models\Faq; +use Astrotomic\Translatable\Validation\RuleFactory; use Illuminate\Validation\ValidationException; class FaqController extends Controller @@ -54,16 +55,10 @@ public function show($id) $faq = Faq::find($id); if (!$faq) { - return response()->json(['error' => 'FAQ not found'], 404); + return response()->json(['error' => __('api.faq_not_found')], 404); } - return response()->json([ - 'id' => $faq->id, - 'title' => $faq->title, - 'description' => $faq->description, - 'created_at' => $faq->created_at, - 'updated_at' => $faq->updated_at - ]); + return response()->json($faq); } /** @@ -100,12 +95,14 @@ public function show($id) public function store(Request $request) { try { - $validatedData = $request->validate([ - 'title' => ['required', 'array'], - 'title.*' => ['required', 'string', 'max:255'], - 'description' => ['required', 'array'], - 'description.*' => ['required', 'string'], + + $rules = RuleFactory::make([ + '%title%' => ['required', 'string', 'max:255'], + '%description%' => ['required_with:%title%', 'string'], ]); + + $validatedData = $request->validate($rules); + $faq = Faq::create($validatedData); @@ -156,27 +153,26 @@ public function store(Request $request) * ) * ) */ + public function update(Request $request, $id) { try { $faq = Faq::find($id); if (!$faq) { - return response()->json(['error' => 'FAQ not found'], 404); + return response()->json(['error' => __('api.faq_not_found')], 404); } - $validatedData = $request->validate([ - 'title' => ['required', 'array'], - 'title.*' => ['required', 'string', 'max:255'], - 'description' => ['required', 'array'], - 'description.*' => ['required', 'string'], + $rules = RuleFactory::make([ + '%title%' => ['string', 'max:255'], + '%description%' => ['string'], ]); + + $validatedData = $request->validate($rules); - $faq->setTranslations('title', $validatedData['title']); - $faq->setTranslations('description', $validatedData['description']); - $faq->save(); + $faq->update($validatedData); + return response()->json(['message' => __('api.faq_updated')], 200); - return response()->json(['message' => 'FAQ updated successfully']); } catch (ValidationException $e) { return response()->json(['errors' => $e->errors()], 422); } @@ -210,11 +206,11 @@ public function destroy($id) $faqs = Faq::find($id); if (!$faqs) { - return response()->json(['error' => 'FAQ not found'], 404); + return response()->json(['error' => __('api.faq_not_found')], 404); } $faqs->delete(); - return response()->json(['message' => 'FAQ deleted successfully']); + return response()->json(['message' => __('api.faq_deleted')]); } } diff --git a/app/Http/Controllers/api/UserController.php b/app/Http/Controllers/api/UserController.php index 1a23f13..10a587b 100644 --- a/app/Http/Controllers/api/UserController.php +++ b/app/Http/Controllers/api/UserController.php @@ -79,10 +79,6 @@ public function store(Request $request) 'dni' => ['required','unique:users',new Dni], 'password' => 'required|string|min:8|confirmed', 'code' => 'required|exists:codes,code,is_used,0' - ], [ - 'email.unique' => 'The email is already in use', - 'dni.unique' => 'The DNI is already in use', - 'password.confirmed' => 'The password confirmation does not match.', ]); // Create a new user. @@ -101,7 +97,7 @@ public function store(Request $request) // Response return response()->json([ 'result' => [ - 'message' => 'User created succesfully.' + 'message' => __('auth.registered') ], 'status' => true ]); @@ -116,7 +112,12 @@ public function store(Request $request) private function is_usedUpdated($code, $userId) { - $code = Code::where('code', $code)->where('is_used', false)->firstOrFail(); + $code = Code::where('code', $code)->where('is_used', false)->first(); + + if(!$code) { + return response()->json(['error' => __('auth.invalid_code')],404); + } + $code->is_used = true; $code->user_id = $userId; // Assign the user ID in the 'user_id' column (table:codes) $code->save(); @@ -161,7 +162,7 @@ public function forgetPassword(ForgetRequest $request){ $user= User::where('email',$email)->first(); if(!$user){ - return response()->json(['error' => 'The email does not exist'],404); + return response()->json(['error' => __('passwords.user')],404); } // Generate password reset token @@ -181,7 +182,7 @@ public function forgetPassword(ForgetRequest $request){ Mail::to($email)->send(new ForgetPasswordMail($user->name, $token)); // send confirmation response - return response()->json(['message'=>'Password reset email sent out. Check your email'],200); + return response()->json(['message'=> __('passwords.sent')],200); }catch(Exception $exception){ @@ -242,7 +243,7 @@ public function resetPassword(ResetRequest $request){ if(!$passwordResets){ return response()->json([ - 'error' => 'Invalid Token!' + 'error' => __('passwords.token') ],400); } /** @var User $user */ @@ -252,7 +253,7 @@ public function resetPassword(ResetRequest $request){ DB::table('password_reset_tokens')->where('email', $passwordResets->email)->delete(); return response()->json([ - 'message' => 'User password reset successfully' + 'message' => __('passwords.reset') ],200); } From 3c5bf0540ff24d2ea1f9bf9635827365e5e1274e Mon Sep 17 00:00:00 2001 From: Edvenan Date: Wed, 4 Oct 2023 17:53:46 +0200 Subject: [PATCH 15/33] Feature Test Suite added --- resources/views/partials/header.blade.php | 2 +- tests/Feature/MultilanguageTest.php | 180 ++++++++++++++++++++++ 2 files changed, 181 insertions(+), 1 deletion(-) create mode 100644 tests/Feature/MultilanguageTest.php diff --git a/resources/views/partials/header.blade.php b/resources/views/partials/header.blade.php index ca131c7..fa1cd64 100644 --- a/resources/views/partials/header.blade.php +++ b/resources/views/partials/header.blade.php @@ -2,7 +2,7 @@
- logo + logo
diff --git a/tests/Feature/MultilanguageTest.php b/tests/Feature/MultilanguageTest.php new file mode 100644 index 0000000..e259c23 --- /dev/null +++ b/tests/Feature/MultilanguageTest.php @@ -0,0 +1,180 @@ +authCreated(); + + $response1 = $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('app.store'),); + $response1->assertStatus(500)->assertSee('El camp url'); + + $response2 = $this->withHeaders(['Authorization' => 'Bearer ' . $token, 'Accept-Language' => 'es'])->postJson(route('app.store'),); + $response2->assertStatus(500)->assertSee('El campo url'); + + } + + /** @test */ + public function create_multilanguage_app_as_authenticated_user(): void + { + + $app = [ + 'ca' => ['title' => 'El joc de les cadires', + 'description' => 'Joc amb més d\'un jugador que consisteix en...'], + 'es' => ['title' => 'El juego de las sillas', + 'description' => 'Juego con más de un jugador que consiste en...'], + 'url' => 'https://chairgame.com', + 'github' => 'https://github.com', + 'state' => 'COMPLETED' + ]; + + $response = $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->postJson(route('app.store'), $app); + $response->assertSee('El juego de las sillas'); + $response->assertStatus(201); + } + + /** @test */ + public function create_multilanguage_faq_as_authenticated_user(): void + { + + $faq = [ + 'ca' => ['title' => 'De què va el joc de les cadires?', + 'description' => 'Joc amb més d\'un jugador que consisteix en...'], + 'es' => ['title' => '¿En qué consiste el juego de las sillas?', + 'description' => 'Juego con más de un jugador que consiste en...'], + ]; + + $response = $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->postJson(route('faq.store'), $faq); + $response->assertSee('consiste el juego de las sillas'); + $response->assertStatus(201); + } + + /** @test */ + public function update_multilanguage_app_as_authenticated_user(): void + { + $app = [ + 'ca' => ['title' => 'El joc de les cadires', + 'description' => 'Joc amb més d\'un jugador que consisteix en...'], + 'es' => ['title' => 'El juego de las sillas', + 'description' => 'Juego con más de un jugador que consiste en...'], + 'url' => 'https://chairgame.com', + 'github' => 'https://github.com', + 'state' => 'COMPLETED' + ]; + + $token = $this->authCreated(); + + $response1 = $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('app.store'), $app); + + $target_id = $response1['id']; + + $modifications = ['ca' => ['title' => 'El joc de les taules']]; + $response2 = $this->withHeaders(['Authorization' => 'Bearer ' . $token])->putJson(route('app.update', ['id' => $target_id]), $modifications); + + $response2->assertStatus(200); + + } + + /** @test */ + public function update_multilanguage_faq_as_authenticated_user(): void + { + $faq = [ + 'ca' => ['title' => 'De què va el joc de les cadires?', + 'description' => 'Joc amb més d\'un jugador que consisteix en...'], + 'es' => ['title' => '¿En qué consiste el juego de las sillas?', + 'description' => 'Juego con más de un jugador que consiste en...'], + ]; + + $token = $this->authCreated(); + + $response1 = $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('faq.store'), $faq); + + $modifications = ['es' => ['title' => '¿En qué consiste el juego de las mesas?']]; + $response2 = $this->withHeaders(['Authorization' => 'Bearer ' . $token])->putJson(route('faq.update', ['id' => 1]), $modifications); + + $response2->assertStatus(200); + + } + + /** @test */ + public function get_app_in_multiple_languages_as_authenticated_user(): void + { + $app = [ + 'ca' => ['title' => 'El joc de les cadires', + 'description' => 'Joc amb més d\'un jugador que consisteix en...'], + 'es' => ['title' => 'El juego de las sillas', + 'description' => 'Juego con más de un jugador que consiste en...'], + 'url' => 'https://chairgame.com', + 'github' => 'https://github.com', + 'state' => 'COMPLETED' + ]; + + $token = $this->authCreated(); + $response1 = $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('app.store'), $app); + + + $response2 = $this->withHeaders(['Authorization' => 'Bearer ' . $token, 'Accept-Language' => 'ca'])->getJson(route('app.show', ['id' => 1])); + $response2->assertStatus(200)->assertSee('joc'); + + + $response3 = $this->withHeaders(['Authorization' => 'Bearer ' . $token, 'Accept-Language' => 'es'])->getJson(route('app.show', ['id' => 1])); + $response3->assertStatus(200)->assertSee('juego'); + + } + + /** @test */ + public function get_faq_in_multiple_languages_as_authenticated_user(): void + { + $faq = [ + 'ca' => ['title' => 'De què va el joc de les cadires?', + 'description' => 'Joc amb més d\'un jugador que consisteix en...'], + 'es' => ['title' => '¿En qué consiste el juego de las sillas?', + 'description' => 'Juego con más de un jugador que consiste en...'], + ]; + + $token = $this->authCreated(); + $response1 = $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('faq.store'), $faq); + + + $response2 = $this->withHeaders(['Authorization' => 'Bearer ' . $token, 'Accept-Language' => 'ca'])->getJson(route('faq.show', ['id' => 1])); + $response2->assertStatus(200)->assertSee('joc'); + + + $response3 = $this->withHeaders(['Authorization' => 'Bearer ' . $token, 'Accept-Language' => 'es'])->getJson(route('faq.show', ['id' => 1])); + $response3->assertStatus(200)->assertSee('juego'); + + } + + + + private function authCreated() + { + Artisan::call('passport:install'); + + $user = User::create([ + 'name' => 'Gabriela', + 'email' => 'gaby@gmail.com', + 'dni' => '39986946S', + 'password' => bcrypt('password'), + 'status' => 'ACTIVE', + 'role' => 'ADMIN', + ]); + return $token = $user->createToken('auth_token')->accessToken; + + } + +} From 39941efe5ca547b2c33517c547ba9c6e0beb10ce Mon Sep 17 00:00:00 2001 From: Edvenan Date: Thu, 5 Oct 2023 14:28:27 +0200 Subject: [PATCH 16/33] Deleted file no longer needed that was causing a bug in SonarCloud --- app/Http/Middleware/Localization.php | 34 ---------------------------- 1 file changed, 34 deletions(-) delete mode 100644 app/Http/Middleware/Localization.php diff --git a/app/Http/Middleware/Localization.php b/app/Http/Middleware/Localization.php deleted file mode 100644 index a6c8d2e..0000000 --- a/app/Http/Middleware/Localization.php +++ /dev/null @@ -1,34 +0,0 @@ -header('accept-language'); - - Session::put('language', $userLanguage); - - \View::share('t', function ($key) { - - - - App::setLocale($request->header("Accept-Language")); - - return $key; - }); - - return $next($request); - } -} \ No newline at end of file From 6beff41a366429b26c397237c17096fad0a7483d Mon Sep 17 00:00:00 2001 From: dustisme Date: Tue, 24 Oct 2023 09:56:14 +0200 Subject: [PATCH 17/33] multilanguage annotation added to AnnotationsInfo.php --- app/Annotations/OpenApi/AnnotationsInfo.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Annotations/OpenApi/AnnotationsInfo.php b/app/Annotations/OpenApi/AnnotationsInfo.php index 6da9d23..8144d29 100644 --- a/app/Annotations/OpenApi/AnnotationsInfo.php +++ b/app/Annotations/OpenApi/AnnotationsInfo.php @@ -1,4 +1,4 @@ - Date: Mon, 30 Oct 2023 13:29:38 +0100 Subject: [PATCH 18/33] AnnotationsInfo.php updated --- app/Annotations/OpenApi/AnnotationsInfo.php | 9 +- bootstrap/cache/packages.php | 115 +++ bootstrap/cache/services.php | 267 +++++++ composer.lock | 766 +++++++++++--------- storage/api-docs/api-docs.json | 2 +- 5 files changed, 795 insertions(+), 364 deletions(-) create mode 100644 bootstrap/cache/packages.php create mode 100644 bootstrap/cache/services.php diff --git a/app/Annotations/OpenApi/AnnotationsInfo.php b/app/Annotations/OpenApi/AnnotationsInfo.php index 8144d29..c9afdcf 100644 --- a/app/Annotations/OpenApi/AnnotationsInfo.php +++ b/app/Annotations/OpenApi/AnnotationsInfo.php @@ -9,12 +9,11 @@ * description="Documentation needed for the API Rest for the landing page to IT Academy. Some useful links below: * [ITA Landing Backend](https://github.com/IT-Academy-BCN/ita-landing-backend) * [ITA Landing Frontend](https://github.com/IT-Academy-BCN/ita-landing-frontend) - * This API supports both Catalan and Spanish languages using the "Accept-Language" header. - * The default language is Catalan." + * This API supports both Catalan and Spanish languages using the 'Accept-Language' header. + * The default language is Catalan.", * ) - * @OA\Server( - * url="http://127.0.0.1:8000/api" - * ) + * @OA\Server( + * url="http://127.0.0.1:8000/api" * ) */ diff --git a/bootstrap/cache/packages.php b/bootstrap/cache/packages.php new file mode 100644 index 0000000..a40cd8f --- /dev/null +++ b/bootstrap/cache/packages.php @@ -0,0 +1,115 @@ + + array ( + 'providers' => + array ( + 0 => 'Astrotomic\\Translatable\\TranslatableServiceProvider', + ), + ), + 'darkaonline/l5-swagger' => + array ( + 'providers' => + array ( + 0 => 'L5Swagger\\L5SwaggerServiceProvider', + ), + 'aliases' => + array ( + 'L5Swagger' => 'L5Swagger\\L5SwaggerFacade', + ), + ), + 'laravel-lang/attributes' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\Attributes\\ServiceProvider', + ), + ), + 'laravel-lang/http-statuses' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\HttpStatuses\\ServiceProvider', + ), + ), + 'laravel-lang/lang' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\Lang\\ServiceProvider', + ), + ), + 'laravel-lang/publisher' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\Publisher\\ServiceProvider', + ), + ), + 'laravel/passport' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Passport\\PassportServiceProvider', + ), + ), + 'laravel/sail' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Sail\\SailServiceProvider', + ), + ), + 'laravel/sanctum' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Sanctum\\SanctumServiceProvider', + ), + ), + 'laravel/tinker' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Tinker\\TinkerServiceProvider', + ), + ), + 'laraveles/spanish' => + array ( + 'providers' => + array ( + 0 => 'Laraveles\\Spanish\\SpanishServiceProvider', + ), + ), + 'nesbot/carbon' => + array ( + 'providers' => + array ( + 0 => 'Carbon\\Laravel\\ServiceProvider', + ), + ), + 'nunomaduro/collision' => + array ( + 'providers' => + array ( + 0 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', + ), + ), + 'nunomaduro/termwind' => + array ( + 'providers' => + array ( + 0 => 'Termwind\\Laravel\\TermwindServiceProvider', + ), + ), + 'spatie/laravel-ignition' => + array ( + 'providers' => + array ( + 0 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider', + ), + 'aliases' => + array ( + 'Flare' => 'Spatie\\LaravelIgnition\\Facades\\Flare', + ), + ), +); \ No newline at end of file diff --git a/bootstrap/cache/services.php b/bootstrap/cache/services.php new file mode 100644 index 0000000..e8351b6 --- /dev/null +++ b/bootstrap/cache/services.php @@ -0,0 +1,267 @@ + + array ( + 0 => 'Illuminate\\Auth\\AuthServiceProvider', + 1 => 'Illuminate\\Broadcasting\\BroadcastServiceProvider', + 2 => 'Illuminate\\Bus\\BusServiceProvider', + 3 => 'Illuminate\\Cache\\CacheServiceProvider', + 4 => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 5 => 'Illuminate\\Cookie\\CookieServiceProvider', + 6 => 'Illuminate\\Database\\DatabaseServiceProvider', + 7 => 'Illuminate\\Encryption\\EncryptionServiceProvider', + 8 => 'Illuminate\\Filesystem\\FilesystemServiceProvider', + 9 => 'Illuminate\\Foundation\\Providers\\FoundationServiceProvider', + 10 => 'Illuminate\\Hashing\\HashServiceProvider', + 11 => 'Illuminate\\Mail\\MailServiceProvider', + 12 => 'Illuminate\\Notifications\\NotificationServiceProvider', + 13 => 'Illuminate\\Pagination\\PaginationServiceProvider', + 14 => 'Illuminate\\Pipeline\\PipelineServiceProvider', + 15 => 'Illuminate\\Queue\\QueueServiceProvider', + 16 => 'Illuminate\\Redis\\RedisServiceProvider', + 17 => 'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider', + 18 => 'Illuminate\\Session\\SessionServiceProvider', + 19 => 'Illuminate\\Translation\\TranslationServiceProvider', + 20 => 'Illuminate\\Validation\\ValidationServiceProvider', + 21 => 'Illuminate\\View\\ViewServiceProvider', + 22 => 'Astrotomic\\Translatable\\TranslatableServiceProvider', + 23 => 'L5Swagger\\L5SwaggerServiceProvider', + 24 => 'LaravelLang\\Attributes\\ServiceProvider', + 25 => 'LaravelLang\\HttpStatuses\\ServiceProvider', + 26 => 'LaravelLang\\Lang\\ServiceProvider', + 27 => 'LaravelLang\\Publisher\\ServiceProvider', + 28 => 'Laravel\\Passport\\PassportServiceProvider', + 29 => 'Laravel\\Sail\\SailServiceProvider', + 30 => 'Laravel\\Sanctum\\SanctumServiceProvider', + 31 => 'Laravel\\Tinker\\TinkerServiceProvider', + 32 => 'Laraveles\\Spanish\\SpanishServiceProvider', + 33 => 'Carbon\\Laravel\\ServiceProvider', + 34 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', + 35 => 'Termwind\\Laravel\\TermwindServiceProvider', + 36 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider', + 37 => 'App\\Providers\\AppServiceProvider', + 38 => 'App\\Providers\\AuthServiceProvider', + 39 => 'App\\Providers\\EventServiceProvider', + 40 => 'App\\Providers\\RouteServiceProvider', + 41 => 'L5Swagger\\L5SwaggerServiceProvider', + ), + 'eager' => + array ( + 0 => 'Illuminate\\Auth\\AuthServiceProvider', + 1 => 'Illuminate\\Cookie\\CookieServiceProvider', + 2 => 'Illuminate\\Database\\DatabaseServiceProvider', + 3 => 'Illuminate\\Encryption\\EncryptionServiceProvider', + 4 => 'Illuminate\\Filesystem\\FilesystemServiceProvider', + 5 => 'Illuminate\\Foundation\\Providers\\FoundationServiceProvider', + 6 => 'Illuminate\\Notifications\\NotificationServiceProvider', + 7 => 'Illuminate\\Pagination\\PaginationServiceProvider', + 8 => 'Illuminate\\Session\\SessionServiceProvider', + 9 => 'Illuminate\\View\\ViewServiceProvider', + 10 => 'Astrotomic\\Translatable\\TranslatableServiceProvider', + 11 => 'L5Swagger\\L5SwaggerServiceProvider', + 12 => 'LaravelLang\\Attributes\\ServiceProvider', + 13 => 'LaravelLang\\HttpStatuses\\ServiceProvider', + 14 => 'LaravelLang\\Lang\\ServiceProvider', + 15 => 'LaravelLang\\Publisher\\ServiceProvider', + 16 => 'Laravel\\Passport\\PassportServiceProvider', + 17 => 'Laravel\\Sanctum\\SanctumServiceProvider', + 18 => 'Laraveles\\Spanish\\SpanishServiceProvider', + 19 => 'Carbon\\Laravel\\ServiceProvider', + 20 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', + 21 => 'Termwind\\Laravel\\TermwindServiceProvider', + 22 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider', + 23 => 'App\\Providers\\AppServiceProvider', + 24 => 'App\\Providers\\AuthServiceProvider', + 25 => 'App\\Providers\\EventServiceProvider', + 26 => 'App\\Providers\\RouteServiceProvider', + 27 => 'L5Swagger\\L5SwaggerServiceProvider', + ), + 'deferred' => + array ( + 'Illuminate\\Broadcasting\\BroadcastManager' => 'Illuminate\\Broadcasting\\BroadcastServiceProvider', + 'Illuminate\\Contracts\\Broadcasting\\Factory' => 'Illuminate\\Broadcasting\\BroadcastServiceProvider', + 'Illuminate\\Contracts\\Broadcasting\\Broadcaster' => 'Illuminate\\Broadcasting\\BroadcastServiceProvider', + 'Illuminate\\Bus\\Dispatcher' => 'Illuminate\\Bus\\BusServiceProvider', + 'Illuminate\\Contracts\\Bus\\Dispatcher' => 'Illuminate\\Bus\\BusServiceProvider', + 'Illuminate\\Contracts\\Bus\\QueueingDispatcher' => 'Illuminate\\Bus\\BusServiceProvider', + 'Illuminate\\Bus\\BatchRepository' => 'Illuminate\\Bus\\BusServiceProvider', + 'Illuminate\\Bus\\DatabaseBatchRepository' => 'Illuminate\\Bus\\BusServiceProvider', + 'cache' => 'Illuminate\\Cache\\CacheServiceProvider', + 'cache.store' => 'Illuminate\\Cache\\CacheServiceProvider', + 'cache.psr6' => 'Illuminate\\Cache\\CacheServiceProvider', + 'memcached.connector' => 'Illuminate\\Cache\\CacheServiceProvider', + 'Illuminate\\Cache\\RateLimiter' => 'Illuminate\\Cache\\CacheServiceProvider', + 'Illuminate\\Foundation\\Console\\AboutCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Cache\\Console\\ClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Cache\\Console\\ForgetCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ClearCompiledCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Auth\\Console\\ClearResetsCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ConfigCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ConfigClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ConfigShowCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\DbCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\MonitorCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\PruneCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\ShowCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\TableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\WipeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\DownCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\EnvironmentCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\EnvironmentDecryptCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\EnvironmentEncryptCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\EventCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\EventClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\EventListCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\KeyGenerateCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\OptimizeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\OptimizeClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\PackageDiscoverCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Cache\\Console\\PruneStaleTagsCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\ClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\ListFailedCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\FlushFailedCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\ForgetFailedCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\ListenCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\MonitorCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\PruneBatchesCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\PruneFailedJobsCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\RestartCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\RetryCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\RetryBatchCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\WorkCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\RouteCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\RouteClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\RouteListCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\DumpCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\Seeds\\SeedCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Console\\Scheduling\\ScheduleFinishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Console\\Scheduling\\ScheduleListCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Console\\Scheduling\\ScheduleRunCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Console\\Scheduling\\ScheduleClearCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Console\\Scheduling\\ScheduleTestCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Console\\Scheduling\\ScheduleWorkCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Console\\Scheduling\\ScheduleInterruptCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\ShowModelCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\StorageLinkCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\UpCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ViewCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ViewClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Cache\\Console\\CacheTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\CastMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ChannelListCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ChannelMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ComponentMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ConsoleMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Routing\\Console\\ControllerMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\DocsCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\EventGenerateCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\EventMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ExceptionMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\Factories\\FactoryMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\JobMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\LangPublishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ListenerMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\MailMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Routing\\Console\\MiddlewareMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ModelMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\NotificationMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Notifications\\Console\\NotificationTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ObserverMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\PolicyMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ProviderMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\FailedTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\TableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Queue\\Console\\BatchesTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\RequestMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ResourceMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\RuleMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ScopeMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\Seeds\\SeederMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Session\\Console\\SessionTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ServeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\StubPublishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\TestMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\VendorPublishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Foundation\\Console\\ViewMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'migrator' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'migration.repository' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'migration.creator' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\Migrations\\MigrateCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\Migrations\\FreshCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\Migrations\\InstallCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\Migrations\\RefreshCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\Migrations\\ResetCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\Migrations\\RollbackCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\Migrations\\StatusCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'Illuminate\\Database\\Console\\Migrations\\MigrateMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'composer' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'hash' => 'Illuminate\\Hashing\\HashServiceProvider', + 'hash.driver' => 'Illuminate\\Hashing\\HashServiceProvider', + 'mail.manager' => 'Illuminate\\Mail\\MailServiceProvider', + 'mailer' => 'Illuminate\\Mail\\MailServiceProvider', + 'Illuminate\\Mail\\Markdown' => 'Illuminate\\Mail\\MailServiceProvider', + 'Illuminate\\Contracts\\Pipeline\\Hub' => 'Illuminate\\Pipeline\\PipelineServiceProvider', + 'pipeline' => 'Illuminate\\Pipeline\\PipelineServiceProvider', + 'queue' => 'Illuminate\\Queue\\QueueServiceProvider', + 'queue.connection' => 'Illuminate\\Queue\\QueueServiceProvider', + 'queue.failer' => 'Illuminate\\Queue\\QueueServiceProvider', + 'queue.listener' => 'Illuminate\\Queue\\QueueServiceProvider', + 'queue.worker' => 'Illuminate\\Queue\\QueueServiceProvider', + 'redis' => 'Illuminate\\Redis\\RedisServiceProvider', + 'redis.connection' => 'Illuminate\\Redis\\RedisServiceProvider', + 'auth.password' => 'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider', + 'auth.password.broker' => 'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider', + 'translator' => 'Illuminate\\Translation\\TranslationServiceProvider', + 'translation.loader' => 'Illuminate\\Translation\\TranslationServiceProvider', + 'validator' => 'Illuminate\\Validation\\ValidationServiceProvider', + 'validation.presence' => 'Illuminate\\Validation\\ValidationServiceProvider', + 'Illuminate\\Contracts\\Validation\\UncompromisedVerifier' => 'Illuminate\\Validation\\ValidationServiceProvider', + 'Laravel\\Sail\\Console\\InstallCommand' => 'Laravel\\Sail\\SailServiceProvider', + 'Laravel\\Sail\\Console\\PublishCommand' => 'Laravel\\Sail\\SailServiceProvider', + 'command.tinker' => 'Laravel\\Tinker\\TinkerServiceProvider', + ), + 'when' => + array ( + 'Illuminate\\Broadcasting\\BroadcastServiceProvider' => + array ( + ), + 'Illuminate\\Bus\\BusServiceProvider' => + array ( + ), + 'Illuminate\\Cache\\CacheServiceProvider' => + array ( + ), + 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider' => + array ( + ), + 'Illuminate\\Hashing\\HashServiceProvider' => + array ( + ), + 'Illuminate\\Mail\\MailServiceProvider' => + array ( + ), + 'Illuminate\\Pipeline\\PipelineServiceProvider' => + array ( + ), + 'Illuminate\\Queue\\QueueServiceProvider' => + array ( + ), + 'Illuminate\\Redis\\RedisServiceProvider' => + array ( + ), + 'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider' => + array ( + ), + 'Illuminate\\Translation\\TranslationServiceProvider' => + array ( + ), + 'Illuminate\\Validation\\ValidationServiceProvider' => + array ( + ), + 'Laravel\\Sail\\SailServiceProvider' => + array ( + ), + 'Laravel\\Tinker\\TinkerServiceProvider' => + array ( + ), + ), +); \ No newline at end of file diff --git a/composer.lock b/composer.lock index 91c98f7..b9528cf 100644 --- a/composer.lock +++ b/composer.lock @@ -680,16 +680,16 @@ }, { "name": "egulias/email-validator", - "version": "4.0.1", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff" + "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/3a85486b709bc384dae8eb78fb2eec649bdb64ff", - "reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ebaaf5be6c0286928352e054f2d5125608e5405e", + "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e", "shasum": "" }, "require": { @@ -698,8 +698,8 @@ "symfony/polyfill-intl-idn": "^1.26" }, "require-dev": { - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^4.30" + "phpunit/phpunit": "^10.2", + "vimeo/psalm": "^5.12" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" @@ -735,7 +735,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/4.0.1" + "source": "https://github.com/egulias/EmailValidator/tree/4.0.2" }, "funding": [ { @@ -743,20 +743,20 @@ "type": "github" } ], - "time": "2023-01-14T14:17:03+00:00" + "time": "2023-10-06T06:47:41+00:00" }, { "name": "firebase/php-jwt", - "version": "v6.8.1", + "version": "v6.9.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "5dbc8959427416b8ee09a100d7a8588c00fb2e26" + "reference": "f03270e63eaccf3019ef0f32849c497385774e11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/5dbc8959427416b8ee09a100d7a8588c00fb2e26", - "reference": "5dbc8959427416b8ee09a100d7a8588c00fb2e26", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/f03270e63eaccf3019ef0f32849c497385774e11", + "reference": "f03270e63eaccf3019ef0f32849c497385774e11", "shasum": "" }, "require": { @@ -804,27 +804,27 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.8.1" + "source": "https://github.com/firebase/php-jwt/tree/v6.9.0" }, - "time": "2023-07-14T18:33:00+00:00" + "time": "2023-10-05T00:24:42+00:00" }, { "name": "fruitcake/php-cors", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/fruitcake/php-cors.git", - "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e" + "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/58571acbaa5f9f462c9c77e911700ac66f446d4e", - "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e", + "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/3d158f36e7875e2f040f37bc0573956240a5a38b", + "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b", "shasum": "" }, "require": { "php": "^7.4|^8.0", - "symfony/http-foundation": "^4.4|^5.4|^6" + "symfony/http-foundation": "^4.4|^5.4|^6|^7" }, "require-dev": { "phpstan/phpstan": "^1.4", @@ -834,7 +834,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.1-dev" + "dev-master": "1.2-dev" } }, "autoload": { @@ -865,7 +865,7 @@ ], "support": { "issues": "https://github.com/fruitcake/php-cors/issues", - "source": "https://github.com/fruitcake/php-cors/tree/v1.2.0" + "source": "https://github.com/fruitcake/php-cors/tree/v1.3.0" }, "funding": [ { @@ -877,7 +877,7 @@ "type": "github" } ], - "time": "2022-02-20T15:07:15+00:00" + "time": "2023-10-12T05:21:21+00:00" }, { "name": "graham-campbell/result-type", @@ -1348,16 +1348,16 @@ }, { "name": "laravel/framework", - "version": "v10.26.2", + "version": "v10.29.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "6e5440f7c518f26b4495e5d7e4796ec239e26df9" + "reference": "2d002849a16ad131110a50cbea4d64dbb78515a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/6e5440f7c518f26b4495e5d7e4796ec239e26df9", - "reference": "6e5440f7c518f26b4495e5d7e4796ec239e26df9", + "url": "https://api.github.com/repos/laravel/framework/zipball/2d002849a16ad131110a50cbea4d64dbb78515a3", + "reference": "2d002849a16ad131110a50cbea4d64dbb78515a3", "shasum": "" }, "require": { @@ -1390,7 +1390,7 @@ "symfony/console": "^6.2", "symfony/error-handler": "^6.2", "symfony/finder": "^6.2", - "symfony/http-foundation": "^6.2", + "symfony/http-foundation": "^6.3", "symfony/http-kernel": "^6.2", "symfony/mailer": "^6.2", "symfony/mime": "^6.2", @@ -1457,13 +1457,15 @@ "league/flysystem-read-only": "^3.3", "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.5.1", + "nyholm/psr7": "^1.2", "orchestra/testbench-core": "^8.12", "pda/pheanstalk": "^4.0", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.0.7", "predis/predis": "^2.0.2", "symfony/cache": "^6.2", - "symfony/http-client": "^6.2.4" + "symfony/http-client": "^6.2.4", + "symfony/psr-http-message-bridge": "^2.0" }, "suggest": { "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", @@ -1544,25 +1546,25 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-10-03T14:24:20+00:00" + "time": "2023-10-24T13:48:53+00:00" }, { "name": "laravel/passport", - "version": "v11.9.1", + "version": "v11.8.4", "source": { "type": "git", "url": "https://github.com/laravel/passport.git", - "reference": "93bb9c36045fe5be2eaeacf35e836c00b392b761" + "reference": "b6b68fad1d02e39c6c659705159487f643393cdd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/passport/zipball/93bb9c36045fe5be2eaeacf35e836c00b392b761", - "reference": "93bb9c36045fe5be2eaeacf35e836c00b392b761", + "url": "https://api.github.com/repos/laravel/passport/zipball/b6b68fad1d02e39c6c659705159487f643393cdd", + "reference": "b6b68fad1d02e39c6c659705159487f643393cdd", "shasum": "" }, "require": { "ext-json": "*", - "firebase/php-jwt": "^6.4", + "firebase/php-jwt": "^6.3.1", "illuminate/auth": "^9.0|^10.0", "illuminate/console": "^9.0|^10.0", "illuminate/container": "^9.0|^10.0", @@ -1572,12 +1574,12 @@ "illuminate/encryption": "^9.0|^10.0", "illuminate/http": "^9.0|^10.0", "illuminate/support": "^9.0|^10.0", - "lcobucci/jwt": "^4.3|^5.0", - "league/oauth2-server": "^8.5.3", - "nyholm/psr7": "^1.5", + "lcobucci/jwt": "^3.4|^4.0", + "league/oauth2-server": "^8.2", + "nyholm/psr7": "^1.3", "php": "^8.0", "phpseclib/phpseclib": "^2.0|^3.0", - "symfony/psr-http-message-bridge": "^2.1" + "symfony/psr-http-message-bridge": "^2.0" }, "require-dev": { "mockery/mockery": "^1.0", @@ -1622,27 +1624,27 @@ "issues": "https://github.com/laravel/passport/issues", "source": "https://github.com/laravel/passport" }, - "time": "2023-09-01T14:20:24+00:00" + "time": "2023-03-18T18:55:20+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.11", + "version": "v0.1.12", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "cce65a90e64712909ea1adc033e1d88de8455ffd" + "reference": "b35f249028c22016e45e48626e19e5d42fd827ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/cce65a90e64712909ea1adc033e1d88de8455ffd", - "reference": "cce65a90e64712909ea1adc033e1d88de8455ffd", + "url": "https://api.github.com/repos/laravel/prompts/zipball/b35f249028c22016e45e48626e19e5d42fd827ff", + "reference": "b35f249028c22016e45e48626e19e5d42fd827ff", "shasum": "" }, "require": { "ext-mbstring": "*", "illuminate/collections": "^10.0|^11.0", "php": "^8.1", - "symfony/console": "^6.2" + "symfony/console": "^6.2|^7.0" }, "conflict": { "illuminate/console": ">=10.17.0 <10.25.0", @@ -1677,9 +1679,9 @@ ], "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.11" + "source": "https://github.com/laravel/prompts/tree/v0.1.12" }, - "time": "2023-10-03T01:07:35+00:00" + "time": "2023-10-18T14:18:57+00:00" }, { "name": "laravel/sanctum", @@ -1749,16 +1751,16 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.3.1", + "version": "v1.3.2", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902" + "reference": "076fe2cf128bd54b4341cdc6d49b95b34e101e4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/e5a3057a5591e1cfe8183034b0203921abe2c902", - "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/076fe2cf128bd54b4341cdc6d49b95b34e101e4c", + "reference": "076fe2cf128bd54b4341cdc6d49b95b34e101e4c", "shasum": "" }, "require": { @@ -1805,7 +1807,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2023-07-14T13:56:28+00:00" + "time": "2023-10-17T13:38:16+00:00" }, { "name": "laravel/tinker", @@ -1944,34 +1946,34 @@ }, { "name": "lcobucci/clock", - "version": "3.1.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/lcobucci/clock.git", - "reference": "30a854ceb22bd87d83a7a4563b3f6312453945fc" + "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/clock/zipball/30a854ceb22bd87d83a7a4563b3f6312453945fc", - "reference": "30a854ceb22bd87d83a7a4563b3f6312453945fc", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/c7aadcd6fd97ed9e199114269c0be3f335e38876", + "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876", "shasum": "" }, "require": { - "php": "~8.2.0", - "psr/clock": "^1.0" + "php": "~8.1.0 || ~8.2.0", + "stella-maris/clock": "^0.1.7" }, "provide": { "psr/clock-implementation": "1.0" }, "require-dev": { "infection/infection": "^0.26", - "lcobucci/coding-standard": "^10.0.0", + "lcobucci/coding-standard": "^9.0", "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^1.10.7", - "phpstan/phpstan-deprecation-rules": "^1.1.3", - "phpstan/phpstan-phpunit": "^1.3.10", - "phpstan/phpstan-strict-rules": "^1.5.0", - "phpunit/phpunit": "^10.0.17" + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-deprecation-rules": "^1.1.1", + "phpstan/phpstan-phpunit": "^1.3.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^9.5.27" }, "type": "library", "autoload": { @@ -1992,7 +1994,7 @@ "description": "Yet another clock abstraction", "support": { "issues": "https://github.com/lcobucci/clock/issues", - "source": "https://github.com/lcobucci/clock/tree/3.1.0" + "source": "https://github.com/lcobucci/clock/tree/2.3.0" }, "funding": [ { @@ -2004,46 +2006,47 @@ "type": "patreon" } ], - "time": "2023-03-20T19:12:25+00:00" + "time": "2022-12-19T14:38:11+00:00" }, { "name": "lcobucci/jwt", - "version": "5.0.0", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/lcobucci/jwt.git", - "reference": "47bdb0e0b5d00c2f89ebe33e7e384c77e84e7c34" + "reference": "55564265fddf810504110bd68ca311932324b0e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/47bdb0e0b5d00c2f89ebe33e7e384c77e84e7c34", - "reference": "47bdb0e0b5d00c2f89ebe33e7e384c77e84e7c34", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/55564265fddf810504110bd68ca311932324b0e9", + "reference": "55564265fddf810504110bd68ca311932324b0e9", "shasum": "" }, "require": { - "ext-hash": "*", - "ext-json": "*", + "ext-mbstring": "*", "ext-openssl": "*", - "ext-sodium": "*", - "php": "~8.1.0 || ~8.2.0", - "psr/clock": "^1.0" + "lcobucci/clock": "^2.0", + "php": "^7.4 || ^8.0" }, "require-dev": { - "infection/infection": "^0.26.19", - "lcobucci/clock": "^3.0", - "lcobucci/coding-standard": "^9.0", - "phpbench/phpbench": "^1.2.8", - "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^1.10.3", - "phpstan/phpstan-deprecation-rules": "^1.1.2", - "phpstan/phpstan-phpunit": "^1.3.8", - "phpstan/phpstan-strict-rules": "^1.5.0", - "phpunit/phpunit": "^10.0.12" - }, - "suggest": { - "lcobucci/clock": ">= 3.0" + "infection/infection": "^0.20", + "lcobucci/coding-standard": "^6.0", + "mikey179/vfsstream": "^1.6", + "phpbench/phpbench": "^0.17", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/php-invoker": "^3.1", + "phpunit/phpunit": "^9.4" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, "autoload": { "psr-4": { "Lcobucci\\JWT\\": "src" @@ -2067,7 +2070,7 @@ ], "support": { "issues": "https://github.com/lcobucci/jwt/issues", - "source": "https://github.com/lcobucci/jwt/tree/5.0.0" + "source": "https://github.com/lcobucci/jwt/tree/4.0.4" }, "funding": [ { @@ -2079,7 +2082,7 @@ "type": "patreon" } ], - "time": "2023-02-25T21:35:16+00:00" + "time": "2021-09-28T19:18:28+00:00" }, { "name": "league/commonmark", @@ -2325,16 +2328,16 @@ }, { "name": "league/flysystem", - "version": "3.16.0", + "version": "3.18.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "4fdf372ca6b63c6e281b1c01a624349ccb757729" + "reference": "015633a05aee22490495159237a5944091d8281e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4fdf372ca6b63c6e281b1c01a624349ccb757729", - "reference": "4fdf372ca6b63c6e281b1c01a624349ccb757729", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/015633a05aee22490495159237a5944091d8281e", + "reference": "015633a05aee22490495159237a5944091d8281e", "shasum": "" }, "require": { @@ -2352,8 +2355,8 @@ "symfony/http-client": "<5.2" }, "require-dev": { - "async-aws/s3": "^1.5", - "async-aws/simple-s3": "^1.1", + "async-aws/s3": "^1.5 || ^2.0", + "async-aws/simple-s3": "^1.1 || ^2.0", "aws/aws-sdk-php": "^3.220.0", "composer/semver": "^3.0", "ext-fileinfo": "*", @@ -2363,7 +2366,7 @@ "google/cloud-storage": "^1.23", "microsoft/azure-storage-blob": "^1.1", "phpseclib/phpseclib": "^3.0.14", - "phpstan/phpstan": "^0.12.26", + "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9.5.11|^10.0", "sabre/dav": "^4.3.1" }, @@ -2399,7 +2402,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.16.0" + "source": "https://github.com/thephpleague/flysystem/tree/3.18.0" }, "funding": [ { @@ -2411,20 +2414,20 @@ "type": "github" } ], - "time": "2023-09-07T19:22:17+00:00" + "time": "2023-10-20T17:59:40+00:00" }, { "name": "league/flysystem-local", - "version": "3.16.0", + "version": "3.18.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-local.git", - "reference": "ec7383f25642e6fd4bb0c9554fc2311245391781" + "reference": "e7381ef7643f658b87efb7dbe98fe538fb1bbf32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/ec7383f25642e6fd4bb0c9554fc2311245391781", - "reference": "ec7383f25642e6fd4bb0c9554fc2311245391781", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/e7381ef7643f658b87efb7dbe98fe538fb1bbf32", + "reference": "e7381ef7643f658b87efb7dbe98fe538fb1bbf32", "shasum": "" }, "require": { @@ -2459,7 +2462,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem-local/issues", - "source": "https://github.com/thephpleague/flysystem-local/tree/3.16.0" + "source": "https://github.com/thephpleague/flysystem-local/tree/3.18.0" }, "funding": [ { @@ -2471,20 +2474,20 @@ "type": "github" } ], - "time": "2023-08-30T10:23:59+00:00" + "time": "2023-10-19T20:07:13+00:00" }, { "name": "league/mime-type-detection", - "version": "1.13.0", + "version": "1.14.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "a6dfb1194a2946fcdc1f38219445234f65b35c96" + "reference": "b6a5854368533df0295c5761a0253656a2e52d9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/a6dfb1194a2946fcdc1f38219445234f65b35c96", - "reference": "a6dfb1194a2946fcdc1f38219445234f65b35c96", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/b6a5854368533df0295c5761a0253656a2e52d9e", + "reference": "b6a5854368533df0295c5761a0253656a2e52d9e", "shasum": "" }, "require": { @@ -2515,7 +2518,7 @@ "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.13.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.14.0" }, "funding": [ { @@ -2527,41 +2530,41 @@ "type": "tidelift" } ], - "time": "2023-08-05T12:09:49+00:00" + "time": "2023-10-17T14:13:20+00:00" }, { "name": "league/oauth2-server", - "version": "8.5.4", + "version": "8.4.2", "source": { "type": "git", "url": "https://github.com/thephpleague/oauth2-server.git", - "reference": "ab7714d073844497fd222d5d0a217629089936bc" + "reference": "007dc5f6c0151a73b133fec36c9686cc956209d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/ab7714d073844497fd222d5d0a217629089936bc", - "reference": "ab7714d073844497fd222d5d0a217629089936bc", + "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/007dc5f6c0151a73b133fec36c9686cc956209d3", + "reference": "007dc5f6c0151a73b133fec36c9686cc956209d3", "shasum": "" }, "require": { - "defuse/php-encryption": "^2.3", + "defuse/php-encryption": "^2.2.1", + "ext-json": "*", "ext-openssl": "*", - "lcobucci/clock": "^2.2 || ^3.0", - "lcobucci/jwt": "^4.3 || ^5.0", + "lcobucci/jwt": "^3.4.6 || ^4.0.4", "league/event": "^2.2", - "league/uri": "^6.7 || ^7.0", - "php": "^8.0", - "psr/http-message": "^1.0.1 || ^2.0" + "league/uri": "^6.4", + "php": "^7.2 || ^8.0", + "psr/http-message": "^1.0.1" }, "replace": { "league/oauth2server": "*", "lncd/oauth2": "*" }, "require-dev": { - "laminas/laminas-diactoros": "^3.0.0", + "laminas/laminas-diactoros": "^2.4.1", "phpstan/phpstan": "^0.12.57", "phpstan/phpstan-phpunit": "^0.12.16", - "phpunit/phpunit": "^9.6.6", + "phpunit/phpunit": "^8.5.13", "roave/security-advisories": "dev-master" }, "type": "library", @@ -2607,7 +2610,7 @@ ], "support": { "issues": "https://github.com/thephpleague/oauth2-server/issues", - "source": "https://github.com/thephpleague/oauth2-server/tree/8.5.4" + "source": "https://github.com/thephpleague/oauth2-server/tree/8.4.2" }, "funding": [ { @@ -2615,48 +2618,58 @@ "type": "github" } ], - "time": "2023-08-25T22:35:12+00:00" + "time": "2023-08-02T22:54:39+00:00" }, { "name": "league/uri", - "version": "7.3.0", + "version": "6.8.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "36743c3961bb82bf93da91917b6bced0358a8d45" + "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/36743c3961bb82bf93da91917b6bced0358a8d45", - "reference": "36743c3961bb82bf93da91917b6bced0358a8d45", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/a700b4656e4c54371b799ac61e300ab25a2d1d39", + "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39", "shasum": "" }, "require": { - "league/uri-interfaces": "^7.3", - "php": "^8.1" + "ext-json": "*", + "league/uri-interfaces": "^2.3", + "php": "^8.1", + "psr/http-message": "^1.0.1" }, "conflict": { "league/uri-schemes": "^1.0" }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v3.9.5", + "nyholm/psr7": "^1.5.1", + "php-http/psr7-integration-tests": "^1.1.1", + "phpbench/phpbench": "^1.2.6", + "phpstan/phpstan": "^1.8.5", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.1.1", + "phpstan/phpstan-strict-rules": "^1.4.3", + "phpunit/phpunit": "^9.5.24", + "psr/http-factory": "^1.0.1" + }, "suggest": { - "ext-bcmath": "to improve IPV4 host parsing", - "ext-fileinfo": "to create Data URI from file contennts", - "ext-gmp": "to improve IPV4 host parsing", - "ext-intl": "to handle IDN host with the best performance", - "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", - "league/uri-components": "Needed to easily manipulate URI objects components", - "php-64bit": "to improve IPV4 host parsing", - "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + "ext-fileinfo": "Needed to create Data URI from a filepath", + "ext-intl": "Needed to improve host validation", + "league/uri-components": "Needed to easily manipulate URI objects", + "psr/http-factory": "Needed to use the URI factory" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "6.x-dev" } }, "autoload": { "psr-4": { - "League\\Uri\\": "" + "League\\Uri\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2696,8 +2709,8 @@ "support": { "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", - "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri/tree/7.3.0" + "issues": "https://github.com/thephpleague/uri/issues", + "source": "https://github.com/thephpleague/uri/tree/6.8.0" }, "funding": [ { @@ -2705,44 +2718,46 @@ "type": "github" } ], - "time": "2023-09-09T17:21:43+00:00" + "time": "2022-09-13T19:58:47+00:00" }, { "name": "league/uri-interfaces", - "version": "7.3.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "c409b60ed2245ff94c965a8c798a60166db53361" + "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/c409b60ed2245ff94c965a8c798a60166db53361", - "reference": "c409b60ed2245ff94c965a8c798a60166db53361", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", + "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", "shasum": "" }, "require": { - "ext-filter": "*", - "php": "^8.1", - "psr/http-factory": "^1", - "psr/http-message": "^1.1 || ^2.0" + "ext-json": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.19", + "phpstan/phpstan": "^0.12.90", + "phpstan/phpstan-phpunit": "^0.12.19", + "phpstan/phpstan-strict-rules": "^0.12.9", + "phpunit/phpunit": "^8.5.15 || ^9.5" }, "suggest": { - "ext-bcmath": "to improve IPV4 host parsing", - "ext-gmp": "to improve IPV4 host parsing", - "ext-intl": "to handle IDN host with the best performance", - "php-64bit": "to improve IPV4 host parsing", - "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + "ext-intl": "to use the IDNA feature", + "symfony/intl": "to use the IDNA feature via Symfony Polyfill" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { "psr-4": { - "League\\Uri\\": "" + "League\\Uri\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2756,32 +2771,17 @@ "homepage": "https://nyamsprod.com" } ], - "description": "Common interfaces and classes for URI representation and interaction", - "homepage": "https://uri.thephpleague.com", + "description": "Common interface for URI representation", + "homepage": "http://github.com/thephpleague/uri-interfaces", "keywords": [ - "data-uri", - "file-uri", - "ftp", - "hostname", - "http", - "https", - "parse_str", - "parse_url", - "psr-7", - "query-string", - "querystring", "rfc3986", "rfc3987", - "rfc6570", "uri", - "url", - "ws" + "url" ], "support": { - "docs": "https://uri.thephpleague.com", - "forum": "https://thephpleague.slack.com", - "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/7.3.0" + "issues": "https://github.com/thephpleague/uri-interfaces/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/2.3.0" }, "funding": [ { @@ -2789,20 +2789,20 @@ "type": "github" } ], - "time": "2023-09-09T17:21:43+00:00" + "time": "2021-06-28T04:27:21+00:00" }, { "name": "monolog/monolog", - "version": "3.4.0", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "e2392369686d420ca32df3803de28b5d6f76867d" + "reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/e2392369686d420ca32df3803de28b5d6f76867d", - "reference": "e2392369686d420ca32df3803de28b5d6f76867d", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c915e2634718dbc8a4a15c61b0e62e7a44e14448", + "reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448", "shasum": "" }, "require": { @@ -2878,7 +2878,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.4.0" + "source": "https://github.com/Seldaek/monolog/tree/3.5.0" }, "funding": [ { @@ -2890,7 +2890,7 @@ "type": "tidelift" } ], - "time": "2023-06-21T08:46:11+00:00" + "time": "2023-10-27T15:32:31+00:00" }, { "name": "nesbot/carbon", @@ -3000,16 +3000,16 @@ }, { "name": "nette/schema", - "version": "v1.2.4", + "version": "v1.2.5", "source": { "type": "git", "url": "https://github.com/nette/schema.git", - "reference": "c9ff517a53903b3d4e29ec547fb20feecb05b8ab" + "reference": "0462f0166e823aad657c9224d0f849ecac1ba10a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/schema/zipball/c9ff517a53903b3d4e29ec547fb20feecb05b8ab", - "reference": "c9ff517a53903b3d4e29ec547fb20feecb05b8ab", + "url": "https://api.github.com/repos/nette/schema/zipball/0462f0166e823aad657c9224d0f849ecac1ba10a", + "reference": "0462f0166e823aad657c9224d0f849ecac1ba10a", "shasum": "" }, "require": { @@ -3056,22 +3056,22 @@ ], "support": { "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.2.4" + "source": "https://github.com/nette/schema/tree/v1.2.5" }, - "time": "2023-08-05T18:56:25+00:00" + "time": "2023-10-05T20:37:59+00:00" }, { "name": "nette/utils", - "version": "v4.0.2", + "version": "v4.0.3", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "cead6637226456b35e1175cc53797dd585d85545" + "reference": "a9d127dd6a203ce6d255b2e2db49759f7506e015" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/cead6637226456b35e1175cc53797dd585d85545", - "reference": "cead6637226456b35e1175cc53797dd585d85545", + "url": "https://api.github.com/repos/nette/utils/zipball/a9d127dd6a203ce6d255b2e2db49759f7506e015", + "reference": "a9d127dd6a203ce6d255b2e2db49759f7506e015", "shasum": "" }, "require": { @@ -3142,9 +3142,9 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.2" + "source": "https://github.com/nette/utils/tree/v4.0.3" }, - "time": "2023-09-19T11:58:07+00:00" + "time": "2023-10-29T21:02:13+00:00" }, { "name": "nikic/php-parser", @@ -3560,16 +3560,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.23", + "version": "3.0.33", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "866cc78fbd82462ffd880e3f65692afe928bed50" + "reference": "33fa69b2514a61138dd48e7a49f99445711e0ad0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/866cc78fbd82462ffd880e3f65692afe928bed50", - "reference": "866cc78fbd82462ffd880e3f65692afe928bed50", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/33fa69b2514a61138dd48e7a49f99445711e0ad0", + "reference": "33fa69b2514a61138dd48e7a49f99445711e0ad0", "shasum": "" }, "require": { @@ -3650,7 +3650,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.23" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.33" }, "funding": [ { @@ -3666,7 +3666,7 @@ "type": "tidelift" } ], - "time": "2023-09-18T17:22:01+00:00" + "time": "2023-10-21T14:00:39+00:00" }, { "name": "psr/cache", @@ -3977,16 +3977,16 @@ }, { "name": "psr/http-message", - "version": "2.0", + "version": "1.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", "shasum": "" }, "require": { @@ -3995,7 +3995,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -4010,7 +4010,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -4024,9 +4024,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" + "source": "https://github.com/php-fig/http-message/tree/1.1" }, - "time": "2023-04-04T09:54:51+00:00" + "time": "2023-04-04T09:50:52+00:00" }, { "name": "psr/log", @@ -4131,16 +4131,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.21", + "version": "v0.11.22", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "bcb22101107f3bf770523b65630c9d547f60c540" + "reference": "128fa1b608be651999ed9789c95e6e2a31b5802b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/bcb22101107f3bf770523b65630c9d547f60c540", - "reference": "bcb22101107f3bf770523b65630c9d547f60c540", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/128fa1b608be651999ed9789c95e6e2a31b5802b", + "reference": "128fa1b608be651999ed9789c95e6e2a31b5802b", "shasum": "" }, "require": { @@ -4169,7 +4169,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "0.11.x-dev" + "dev-0.11": "0.11.x-dev" }, "bamarni-bin": { "bin-links": false, @@ -4205,9 +4205,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.21" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.22" }, - "time": "2023-09-17T21:15:54+00:00" + "time": "2023-10-14T21:56:36+00:00" }, { "name": "ralouphie/getallheaders", @@ -4434,18 +4434,65 @@ ], "time": "2023-04-15T23:01:58+00:00" }, + { + "name": "stella-maris/clock", + "version": "0.1.7", + "source": { + "type": "git", + "url": "https://github.com/stella-maris-solutions/clock.git", + "reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/stella-maris-solutions/clock/zipball/fa23ce16019289a18bb3446fdecd45befcdd94f8", + "reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8", + "shasum": "" + }, + "require": { + "php": "^7.0|^8.0", + "psr/clock": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "StellaMaris\\Clock\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Heigl", + "role": "Maintainer" + } + ], + "description": "A pre-release of the proposed PSR-20 Clock-Interface", + "homepage": "https://gitlab.com/stella-maris/clock", + "keywords": [ + "clock", + "datetime", + "point in time", + "psr20" + ], + "support": { + "source": "https://github.com/stella-maris-solutions/clock/tree/0.1.7" + }, + "time": "2022-11-25T16:15:06+00:00" + }, { "name": "swagger-api/swagger-ui", - "version": "v5.9.0", + "version": "v5.9.1", "source": { "type": "git", "url": "https://github.com/swagger-api/swagger-ui.git", - "reference": "cbfc3e949d3d9e2b71d566fb722cb3970036f593" + "reference": "bb59bcf36dff8b6476299ab7d45cc87957999d36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/cbfc3e949d3d9e2b71d566fb722cb3970036f593", - "reference": "cbfc3e949d3d9e2b71d566fb722cb3970036f593", + "url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/bb59bcf36dff8b6476299ab7d45cc87957999d36", + "reference": "bb59bcf36dff8b6476299ab7d45cc87957999d36", "shasum": "" }, "type": "library", @@ -4491,9 +4538,9 @@ ], "support": { "issues": "https://github.com/swagger-api/swagger-ui/issues", - "source": "https://github.com/swagger-api/swagger-ui/tree/v5.9.0" + "source": "https://github.com/swagger-api/swagger-ui/tree/v5.9.1" }, - "time": "2023-09-29T12:27:07+00:00" + "time": "2023-10-25T08:21:35+00:00" }, { "name": "symfony/console", @@ -5013,16 +5060,16 @@ }, { "name": "symfony/http-foundation", - "version": "v6.3.5", + "version": "v6.3.7", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957" + "reference": "59d1837d5d992d16c2628cd0d6b76acf8d69b33e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b50f5e281d722cb0f4c296f908bacc3e2b721957", - "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/59d1837d5d992d16c2628cd0d6b76acf8d69b33e", + "reference": "59d1837d5d992d16c2628cd0d6b76acf8d69b33e", "shasum": "" }, "require": { @@ -5032,12 +5079,12 @@ "symfony/polyfill-php83": "^1.27" }, "conflict": { - "symfony/cache": "<6.2" + "symfony/cache": "<6.3" }, "require-dev": { - "doctrine/dbal": "^2.13.1|^3.0", + "doctrine/dbal": "^2.13.1|^3|^4", "predis/predis": "^1.1|^2.0", - "symfony/cache": "^5.4|^6.0", + "symfony/cache": "^6.3", "symfony/dependency-injection": "^5.4|^6.0", "symfony/expression-language": "^5.4|^6.0", "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", @@ -5070,7 +5117,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.3.5" + "source": "https://github.com/symfony/http-foundation/tree/v6.3.7" }, "funding": [ { @@ -5086,20 +5133,20 @@ "type": "tidelift" } ], - "time": "2023-09-04T21:33:54+00:00" + "time": "2023-10-28T23:55:27+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.3.5", + "version": "v6.3.7", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "9f991a964368bee8d883e8d57ced4fe9fff04dfc" + "reference": "6d4098095f93279d9536a0e9124439560cc764d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f991a964368bee8d883e8d57ced4fe9fff04dfc", - "reference": "9f991a964368bee8d883e8d57ced4fe9fff04dfc", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/6d4098095f93279d9536a0e9124439560cc764d0", + "reference": "6d4098095f93279d9536a0e9124439560cc764d0", "shasum": "" }, "require": { @@ -5183,7 +5230,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.3.5" + "source": "https://github.com/symfony/http-kernel/tree/v6.3.7" }, "funding": [ { @@ -5199,7 +5246,7 @@ "type": "tidelift" } ], - "time": "2023-09-30T06:37:04+00:00" + "time": "2023-10-29T14:31:45+00:00" }, { "name": "symfony/mailer", @@ -6506,16 +6553,16 @@ }, { "name": "symfony/translation", - "version": "v6.3.3", + "version": "v6.3.7", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "3ed078c54bc98bbe4414e1e9b2d5e85ed5a5c8bd" + "reference": "30212e7c87dcb79c83f6362b00bde0e0b1213499" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/3ed078c54bc98bbe4414e1e9b2d5e85ed5a5c8bd", - "reference": "3ed078c54bc98bbe4414e1e9b2d5e85ed5a5c8bd", + "url": "https://api.github.com/repos/symfony/translation/zipball/30212e7c87dcb79c83f6362b00bde0e0b1213499", + "reference": "30212e7c87dcb79c83f6362b00bde0e0b1213499", "shasum": "" }, "require": { @@ -6581,7 +6628,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.3.3" + "source": "https://github.com/symfony/translation/tree/v6.3.7" }, "funding": [ { @@ -6597,7 +6644,7 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2023-10-28T23:11:45+00:00" }, { "name": "symfony/translation-contracts", @@ -6753,16 +6800,16 @@ }, { "name": "symfony/var-dumper", - "version": "v6.3.5", + "version": "v6.3.6", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "3d9999376be5fea8de47752837a3e1d1c5f69ef5" + "reference": "999ede244507c32b8e43aebaa10e9fce20de7c97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3d9999376be5fea8de47752837a3e1d1c5f69ef5", - "reference": "3d9999376be5fea8de47752837a3e1d1c5f69ef5", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/999ede244507c32b8e43aebaa10e9fce20de7c97", + "reference": "999ede244507c32b8e43aebaa10e9fce20de7c97", "shasum": "" }, "require": { @@ -6817,7 +6864,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.3.5" + "source": "https://github.com/symfony/var-dumper/tree/v6.3.6" }, "funding": [ { @@ -6833,20 +6880,20 @@ "type": "tidelift" } ], - "time": "2023-09-12T10:11:35+00:00" + "time": "2023-10-12T18:45:56+00:00" }, { "name": "symfony/yaml", - "version": "v6.3.3", + "version": "v6.3.7", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add" + "reference": "9758b6c69d179936435d0ffb577c3708d57e38a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e23292e8c07c85b971b44c1c4b87af52133e2add", - "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add", + "url": "https://api.github.com/repos/symfony/yaml/zipball/9758b6c69d179936435d0ffb577c3708d57e38a8", + "reference": "9758b6c69d179936435d0ffb577c3708d57e38a8", "shasum": "" }, "require": { @@ -6889,7 +6936,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.3.3" + "source": "https://github.com/symfony/yaml/tree/v6.3.7" }, "funding": [ { @@ -6905,7 +6952,7 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2023-10-28T23:31:00+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -7178,16 +7225,16 @@ }, { "name": "zircote/swagger-php", - "version": "4.7.14", + "version": "4.7.15", "source": { "type": "git", "url": "https://github.com/zircote/swagger-php.git", - "reference": "e53c0c7a6e250c435cc13ab50792247a8eb07da3" + "reference": "df8de8e484003f68cd2fa68db1e6cfb47a3a92cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zircote/swagger-php/zipball/e53c0c7a6e250c435cc13ab50792247a8eb07da3", - "reference": "e53c0c7a6e250c435cc13ab50792247a8eb07da3", + "url": "https://api.github.com/repos/zircote/swagger-php/zipball/df8de8e484003f68cd2fa68db1e6cfb47a3a92cb", + "reference": "df8de8e484003f68cd2fa68db1e6cfb47a3a92cb", "shasum": "" }, "require": { @@ -7250,9 +7297,9 @@ ], "support": { "issues": "https://github.com/zircote/swagger-php/issues", - "source": "https://github.com/zircote/swagger-php/tree/4.7.14" + "source": "https://github.com/zircote/swagger-php/tree/4.7.15" }, - "time": "2023-09-12T00:18:13+00:00" + "time": "2023-10-12T20:26:34+00:00" } ], "packages-dev": [ @@ -7831,25 +7878,25 @@ }, { "name": "laravel-lang/attributes", - "version": "v2.4.1", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/Laravel-Lang/attributes.git", - "reference": "c3dce4766cac85fc7430b634d14065e811d691bf" + "reference": "c2a1611dd716e9c6bf7646a866a45e0087aa9cdf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Laravel-Lang/attributes/zipball/c3dce4766cac85fc7430b634d14065e811d691bf", - "reference": "c3dce4766cac85fc7430b634d14065e811d691bf", + "url": "https://api.github.com/repos/Laravel-Lang/attributes/zipball/c2a1611dd716e9c6bf7646a866a45e0087aa9cdf", + "reference": "c2a1611dd716e9c6bf7646a866a45e0087aa9cdf", "shasum": "" }, "require": { "ext-json": "*", - "laravel-lang/publisher": "^14.0", + "laravel-lang/publisher": "^14.0 || ^15.0", "php": "^8.1" }, "require-dev": { - "laravel-lang/status-generator": "^1.19", + "laravel-lang/status-generator": "^1.19 || ^2.0", "phpunit/phpunit": "^10.0", "symfony/var-dumper": "^6.0" }, @@ -7863,7 +7910,7 @@ }, "autoload": { "psr-4": { - "LaravelLang\\Attributes\\": "src" + "LaravelLang\\Attributes\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -7894,7 +7941,7 @@ ], "support": { "issues": "https://github.com/Laravel-Lang/attributes/issues", - "source": "https://github.com/Laravel-Lang/attributes/tree/v2.4.1" + "source": "https://github.com/Laravel-Lang/attributes/tree/2.5.0" }, "funding": [ { @@ -7902,7 +7949,7 @@ "type": "open_collective" } ], - "time": "2023-09-15T20:14:52+00:00" + "time": "2023-10-30T12:07:10+00:00" }, { "name": "laravel-lang/common", @@ -7979,28 +8026,28 @@ }, { "name": "laravel-lang/http-statuses", - "version": "v3.4.5", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/Laravel-Lang/http-statuses.git", - "reference": "03e50c7f3629e28786e37ea8b8c9da14eab311fb" + "reference": "66ccd21ec0f364d94ed7dad9bc1e47a6ab21ce3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Laravel-Lang/http-statuses/zipball/03e50c7f3629e28786e37ea8b8c9da14eab311fb", - "reference": "03e50c7f3629e28786e37ea8b8c9da14eab311fb", + "url": "https://api.github.com/repos/Laravel-Lang/http-statuses/zipball/66ccd21ec0f364d94ed7dad9bc1e47a6ab21ce3d", + "reference": "66ccd21ec0f364d94ed7dad9bc1e47a6ab21ce3d", "shasum": "" }, "require": { "ext-json": "*", - "laravel-lang/publisher": "^14.1", + "laravel-lang/publisher": "^14.1 || ^15.0", "php": "^8.1" }, "conflict": { "laravel-lang/publisher": "<14.0" }, "require-dev": { - "laravel-lang/status-generator": "^1.19", + "laravel-lang/status-generator": "^1.19 || ^2.0", "phpunit/phpunit": "^10.0", "symfony/var-dumper": "^6.0" }, @@ -8043,7 +8090,7 @@ ], "support": { "issues": "https://github.com/Laravel-Lang/http-statuses/issues", - "source": "https://github.com/Laravel-Lang/http-statuses/tree/v3.4.5" + "source": "https://github.com/Laravel-Lang/http-statuses/tree/3.5.0" }, "funding": [ { @@ -8051,7 +8098,7 @@ "type": "open_collective" } ], - "time": "2023-09-14T01:14:10+00:00" + "time": "2023-10-30T11:58:07+00:00" }, { "name": "laravel-lang/lang", @@ -8121,16 +8168,16 @@ }, { "name": "laravel-lang/publisher", - "version": "v14.7.0", + "version": "14.7.1", "source": { "type": "git", "url": "https://github.com/Laravel-Lang/publisher.git", - "reference": "4e6fa2d8c446282b832ffb16b9b3c33aa4296a5b" + "reference": "946405e3d8c7105b0ae8cf8de34a3e6e98a70a84" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Laravel-Lang/publisher/zipball/4e6fa2d8c446282b832ffb16b9b3c33aa4296a5b", - "reference": "4e6fa2d8c446282b832ffb16b9b3c33aa4296a5b", + "url": "https://api.github.com/repos/Laravel-Lang/publisher/zipball/946405e3d8c7105b0ae8cf8de34a3e6e98a70a84", + "reference": "946405e3d8c7105b0ae8cf8de34a3e6e98a70a84", "shasum": "" }, "require": { @@ -8224,20 +8271,20 @@ "type": "open_collective" } ], - "time": "2023-08-09T09:09:57+00:00" + "time": "2023-10-29T21:03:27+00:00" }, { "name": "laravel/pint", - "version": "v1.13.2", + "version": "v1.13.5", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "bbb13460d7f8c5c0cd9a58109beedd79cd7331ff" + "reference": "df105cf8ce7a8f0b8a9425ff45cd281a5448e423" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/bbb13460d7f8c5c0cd9a58109beedd79cd7331ff", - "reference": "bbb13460d7f8c5c0cd9a58109beedd79cd7331ff", + "url": "https://api.github.com/repos/laravel/pint/zipball/df105cf8ce7a8f0b8a9425ff45cd281a5448e423", + "reference": "df105cf8ce7a8f0b8a9425ff45cd281a5448e423", "shasum": "" }, "require": { @@ -8248,13 +8295,13 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.26.1", - "illuminate/view": "^10.23.1", + "friendsofphp/php-cs-fixer": "^3.34.1", + "illuminate/view": "^10.26.2", "laravel-zero/framework": "^10.1.2", "mockery/mockery": "^1.6.6", "nunomaduro/larastan": "^2.6.4", "nunomaduro/termwind": "^1.15.1", - "pestphp/pest": "^2.18.2" + "pestphp/pest": "^2.20.0" }, "bin": [ "builds/pint" @@ -8290,31 +8337,31 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2023-09-19T15:55:02+00:00" + "time": "2023-10-26T09:26:10+00:00" }, { "name": "laravel/sail", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "e81a7bd7ac1a745ccb25572830fecf74a89bb48a" + "reference": "c60fe037004e272efd0d81f416ed2bfc623d70b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/e81a7bd7ac1a745ccb25572830fecf74a89bb48a", - "reference": "e81a7bd7ac1a745ccb25572830fecf74a89bb48a", + "url": "https://api.github.com/repos/laravel/sail/zipball/c60fe037004e272efd0d81f416ed2bfc623d70b4", + "reference": "c60fe037004e272efd0d81f416ed2bfc623d70b4", "shasum": "" }, "require": { - "illuminate/console": "^8.0|^9.0|^10.0", - "illuminate/contracts": "^8.0|^9.0|^10.0", - "illuminate/support": "^8.0|^9.0|^10.0", + "illuminate/console": "^9.0|^10.0|^11.0", + "illuminate/contracts": "^9.0|^10.0|^11.0", + "illuminate/support": "^9.0|^10.0|^11.0", "php": "^8.0", - "symfony/yaml": "^6.0" + "symfony/yaml": "^6.0|^7.0" }, "require-dev": { - "orchestra/testbench": "^6.0|^7.0|^8.0", + "orchestra/testbench": "^7.0|^8.0|^9.0", "phpstan/phpstan": "^1.10" }, "bin": [ @@ -8355,7 +8402,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2023-09-11T17:37:09+00:00" + "time": "2023-10-18T13:57:15+00:00" }, { "name": "mockery/mockery", @@ -8503,16 +8550,16 @@ }, { "name": "nunomaduro/collision", - "version": "v7.9.0", + "version": "v7.10.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "296d0cf9fe462837ac0da8a568b56fc026b132da" + "reference": "49ec67fa7b002712da8526678abd651c09f375b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/296d0cf9fe462837ac0da8a568b56fc026b132da", - "reference": "296d0cf9fe462837ac0da8a568b56fc026b132da", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/49ec67fa7b002712da8526678abd651c09f375b2", + "reference": "49ec67fa7b002712da8526678abd651c09f375b2", "shasum": "" }, "require": { @@ -8521,19 +8568,22 @@ "php": "^8.1.0", "symfony/console": "^6.3.4" }, + "conflict": { + "laravel/framework": ">=11.0.0" + }, "require-dev": { - "brianium/paratest": "^7.2.7", - "laravel/framework": "^10.23.1", - "laravel/pint": "^1.13.1", + "brianium/paratest": "^7.3.0", + "laravel/framework": "^10.28.0", + "laravel/pint": "^1.13.3", "laravel/sail": "^1.25.0", "laravel/sanctum": "^3.3.1", "laravel/tinker": "^2.8.2", "nunomaduro/larastan": "^2.6.4", - "orchestra/testbench-core": "^8.11.0", - "pestphp/pest": "^2.19.1", - "phpunit/phpunit": "^10.3.5", + "orchestra/testbench-core": "^8.13.0", + "pestphp/pest": "^2.23.2", + "phpunit/phpunit": "^10.4.1", "sebastian/environment": "^6.0.1", - "spatie/laravel-ignition": "^2.3.0" + "spatie/laravel-ignition": "^2.3.1" }, "type": "library", "extra": { @@ -8592,7 +8642,7 @@ "type": "patreon" } ], - "time": "2023-09-19T10:45:09+00:00" + "time": "2023-10-11T15:45:01+00:00" }, { "name": "phar-io/manifest", @@ -8707,16 +8757,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.6", + "version": "10.1.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "56f33548fe522c8d82da7ff3824b42829d324364" + "reference": "355324ca4980b8916c18b9db29f3ef484078f26e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/56f33548fe522c8d82da7ff3824b42829d324364", - "reference": "56f33548fe522c8d82da7ff3824b42829d324364", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/355324ca4980b8916c18b9db29f3ef484078f26e", + "reference": "355324ca4980b8916c18b9db29f3ef484078f26e", "shasum": "" }, "require": { @@ -8773,7 +8823,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.6" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.7" }, "funding": [ { @@ -8781,7 +8831,7 @@ "type": "github" } ], - "time": "2023-09-19T04:59:03+00:00" + "time": "2023-10-04T15:34:17+00:00" }, { "name": "phpunit/php-file-iterator", @@ -9028,16 +9078,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.3.5", + "version": "10.4.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "747c3b2038f1139e3dcd9886a3f5a948648b7503" + "reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/747c3b2038f1139e3dcd9886a3f5a948648b7503", - "reference": "747c3b2038f1139e3dcd9886a3f5a948648b7503", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/cacd8b9dd224efa8eb28beb69004126c7ca1a1a1", + "reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1", "shasum": "" }, "require": { @@ -9077,7 +9127,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.3-dev" + "dev-main": "10.4-dev" } }, "autoload": { @@ -9109,7 +9159,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.3.5" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.2" }, "funding": [ { @@ -9125,7 +9175,7 @@ "type": "tidelift" } ], - "time": "2023-09-19T05:42:37+00:00" + "time": "2023-10-26T07:21:45+00:00" }, { "name": "sebastian/cli-parser", @@ -10106,35 +10156,35 @@ }, { "name": "spatie/flare-client-php", - "version": "1.4.2", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/spatie/flare-client-php.git", - "reference": "5f2c6a7a0d2c1d90c12559dc7828fd942911a544" + "reference": "5db2fdd743c3ede33f2a5367d89ec1a7c9c1d1ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/5f2c6a7a0d2c1d90c12559dc7828fd942911a544", - "reference": "5f2c6a7a0d2c1d90c12559dc7828fd942911a544", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/5db2fdd743c3ede33f2a5367d89ec1a7c9c1d1ec", + "reference": "5db2fdd743c3ede33f2a5367d89ec1a7c9c1d1ec", "shasum": "" }, "require": { - "illuminate/pipeline": "^8.0|^9.0|^10.0", + "illuminate/pipeline": "^8.0|^9.0|^10.0|^11.0", "nesbot/carbon": "^2.62.1", "php": "^8.0", "spatie/backtrace": "^1.5.2", - "symfony/http-foundation": "^5.0|^6.0", - "symfony/mime": "^5.2|^6.0", - "symfony/process": "^5.2|^6.0", - "symfony/var-dumper": "^5.2|^6.0" + "symfony/http-foundation": "^5.2|^6.0|^7.0", + "symfony/mime": "^5.2|^6.0|^7.0", + "symfony/process": "^5.2|^6.0|^7.0", + "symfony/var-dumper": "^5.2|^6.0|^7.0" }, "require-dev": { - "dms/phpunit-arraysubset-asserts": "^0.3.0", - "pestphp/pest": "^1.20", + "dms/phpunit-arraysubset-asserts": "^0.5.0", + "pestphp/pest": "^1.20|^2.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "spatie/phpunit-snapshot-assertions": "^4.0" + "spatie/phpunit-snapshot-assertions": "^4.0|^5.0" }, "type": "library", "extra": { @@ -10164,7 +10214,7 @@ ], "support": { "issues": "https://github.com/spatie/flare-client-php/issues", - "source": "https://github.com/spatie/flare-client-php/tree/1.4.2" + "source": "https://github.com/spatie/flare-client-php/tree/1.4.3" }, "funding": [ { @@ -10172,20 +10222,20 @@ "type": "github" } ], - "time": "2023-07-28T08:07:24+00:00" + "time": "2023-10-17T15:54:07+00:00" }, { "name": "spatie/ignition", - "version": "1.11.2", + "version": "1.11.3", "source": { "type": "git", "url": "https://github.com/spatie/ignition.git", - "reference": "48b23411ca4bfbc75c75dfc638b6b36159c375aa" + "reference": "3d886de644ff7a5b42e4d27c1e1f67c8b5f00044" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/48b23411ca4bfbc75c75dfc638b6b36159c375aa", - "reference": "48b23411ca4bfbc75c75dfc638b6b36159c375aa", + "url": "https://api.github.com/repos/spatie/ignition/zipball/3d886de644ff7a5b42e4d27c1e1f67c8b5f00044", + "reference": "3d886de644ff7a5b42e4d27c1e1f67c8b5f00044", "shasum": "" }, "require": { @@ -10194,19 +10244,19 @@ "php": "^8.0", "spatie/backtrace": "^1.5.3", "spatie/flare-client-php": "^1.4.0", - "symfony/console": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "require-dev": { - "illuminate/cache": "^9.52", + "illuminate/cache": "^9.52|^10.0|^11.0", "mockery/mockery": "^1.4", - "pestphp/pest": "^1.20", + "pestphp/pest": "^1.20|^2.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", "psr/simple-cache-implementation": "*", - "symfony/cache": "^6.0", - "symfony/process": "^5.4|^6.0", + "symfony/cache": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", "vlucas/phpdotenv": "^5.5" }, "suggest": { @@ -10255,20 +10305,20 @@ "type": "github" } ], - "time": "2023-09-19T15:29:52+00:00" + "time": "2023-10-18T14:09:40+00:00" }, { "name": "spatie/laravel-ignition", - "version": "2.3.0", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "4ed813d16edb5a1ab0d7f4b1d116c37ee8cdf3c0" + "reference": "bf21cd15aa47fa4ec5d73bbc932005c70261efc8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/4ed813d16edb5a1ab0d7f4b1d116c37ee8cdf3c0", - "reference": "4ed813d16edb5a1ab0d7f4b1d116c37ee8cdf3c0", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/bf21cd15aa47fa4ec5d73bbc932005c70261efc8", + "reference": "bf21cd15aa47fa4ec5d73bbc932005c70261efc8", "shasum": "" }, "require": { @@ -10347,7 +10397,7 @@ "type": "github" } ], - "time": "2023-08-23T06:24:34+00:00" + "time": "2023-10-09T12:55:26+00:00" }, { "name": "symfony/polyfill-php81", diff --git a/storage/api-docs/api-docs.json b/storage/api-docs/api-docs.json index 0af52d3..6a239bb 100644 --- a/storage/api-docs/api-docs.json +++ b/storage/api-docs/api-docs.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "title": "ITA Landing page API documentation", - "description": "Documentation needed for the API Rest for the landing page to IT Academy. Some useful links below:\n * [ITA Landing Backend](https://github.com/IT-Academy-BCN/ita-landing-backend)\n * [ITA Landing Frontend](https://github.com/IT-Academy-BCN/ita-landing-frontend)", + "description": "Documentation needed for the API Rest for the landing page to IT Academy. Some useful links below:\n * [ITA Landing Backend](https://github.com/IT-Academy-BCN/ita-landing-backend)\n * [ITA Landing Frontend](https://github.com/IT-Academy-BCN/ita-landing-frontend)\n * This API supports both Catalan and Spanish languages using the 'Accept-Language' header.\n * The default language is Catalan.", "version": "1.0.0" }, "servers": [ From 004d456c95e4c2fe106f3b1cd23b94d28bbd9cd6 Mon Sep 17 00:00:00 2001 From: dustisme Date: Mon, 30 Oct 2023 13:34:30 +0100 Subject: [PATCH 19/33] add github field in AnnotationsApp.php --- .../appAnnotations/AnnotationsApp.php | 10 ++++++++-- .../faqAnnotations/AnnotationsFaq.php | 4 ++-- storage/api-docs/api-docs.json | 5 +++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/app/Annotations/OpenApi/modelsAnnotations/appAnnotations/AnnotationsApp.php b/app/Annotations/OpenApi/modelsAnnotations/appAnnotations/AnnotationsApp.php index ef28f75..a2e5f6d 100644 --- a/app/Annotations/OpenApi/modelsAnnotations/appAnnotations/AnnotationsApp.php +++ b/app/Annotations/OpenApi/modelsAnnotations/appAnnotations/AnnotationsApp.php @@ -1,4 +1,4 @@ - Date: Tue, 31 Oct 2023 14:01:08 +0100 Subject: [PATCH 20/33] add translatable fields annotations for app and faq controllers --- .../appAnnotations/AnnotationsApps.php | 72 ++++++++++++----- .../authAnnotations/AnnotationsAuth.php | 9 +-- .../codeAnnotations/AnnotationsCode.php | 3 +- .../AnnotationsCollaborators.php | 7 +- .../faqsAnnotations/AnnotationsFaqs.php | 79 +++++++++++++------ storage/api-docs/api-docs.json | 54 ++++++++++--- 6 files changed, 164 insertions(+), 60 deletions(-) diff --git a/app/Annotations/OpenApi/controllersAnnotations/appAnnotations/AnnotationsApps.php b/app/Annotations/OpenApi/controllersAnnotations/appAnnotations/AnnotationsApps.php index d6f540f..1e74fd5 100644 --- a/app/Annotations/OpenApi/controllersAnnotations/appAnnotations/AnnotationsApps.php +++ b/app/Annotations/OpenApi/controllersAnnotations/appAnnotations/AnnotationsApps.php @@ -1,4 +1,4 @@ - Date: Tue, 31 Oct 2023 14:36:34 +0100 Subject: [PATCH 21/33] new doc generated --- storage/api-docs/api-docs.json | 52 ++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/storage/api-docs/api-docs.json b/storage/api-docs/api-docs.json index dff7c46..3bd8943 100644 --- a/storage/api-docs/api-docs.json +++ b/storage/api-docs/api-docs.json @@ -462,12 +462,30 @@ "schema": { "properties": { "title": { - "type": "string", - "example": "My frequently asked question" + "properties": { + "ca": { + "type": "string", + "example": "Títol de la meva pregunta freqüent" + }, + "es": { + "type": "string", + "example": "Título de mi pregunta frecuente" + } + }, + "type": "object" }, "description": { - "type": "string", - "example": "Description of my FAQ" + "properties": { + "ca": { + "type": "string", + "example": "Descripció de la meva pregunta freqüent" + }, + "es": { + "type": "string", + "example": "Descripción de mi pregunta frecuente" + } + }, + "type": "object" } }, "type": "object" @@ -544,12 +562,30 @@ "schema": { "properties": { "title": { - "type": "string", - "example": "New title of my FAQ" + "properties": { + "ca": { + "type": "string", + "example": "New Catalan title of my FAQ" + }, + "es": { + "type": "string", + "example": "New Spanish title of my FAQ" + } + }, + "type": "object" }, "description": { - "type": "string", - "example": "New description of my FAQ" + "properties": { + "ca": { + "type": "string", + "example": "New Catalan description of my FAQ" + }, + "es": { + "type": "string", + "example": "New Spanish description of my FAQ" + } + }, + "type": "object" } }, "type": "object" From a9d233a59b2cf5812f9deb98a1fca9e71c8c2177 Mon Sep 17 00:00:00 2001 From: dustisme Date: Mon, 6 Nov 2023 11:21:20 +0100 Subject: [PATCH 22/33] refactored swagger annotations to document new translatable package --- .../appAnnotations/AnnotationsApps.php | 36 +++--- .../faqsAnnotations/AnnotationsFaqs.php | 36 +++--- app/Models/FaqTranslation.php | 4 +- bootstrap/cache/pac2A98.tmp | 115 ++++++++++++++++++ bootstrap/cache/pac2A99.tmp | 115 ++++++++++++++++++ bootstrap/cache/pac2A9A.tmp | 115 ++++++++++++++++++ storage/api-docs/api-docs.json | 72 +++++------ 7 files changed, 419 insertions(+), 74 deletions(-) create mode 100644 bootstrap/cache/pac2A98.tmp create mode 100644 bootstrap/cache/pac2A99.tmp create mode 100644 bootstrap/cache/pac2A9A.tmp diff --git a/app/Annotations/OpenApi/controllersAnnotations/appAnnotations/AnnotationsApps.php b/app/Annotations/OpenApi/controllersAnnotations/appAnnotations/AnnotationsApps.php index 1e74fd5..ce43043 100644 --- a/app/Annotations/OpenApi/controllersAnnotations/appAnnotations/AnnotationsApps.php +++ b/app/Annotations/OpenApi/controllersAnnotations/appAnnotations/AnnotationsApps.php @@ -30,29 +30,29 @@ public function index() {} * mediaType="application/json", * @OA\Schema( * @OA\Property( - * property="title", + * property="ca", * type="object", * @OA\Property( - * property="ca", + * property="title", * type="string", * example="Títol de la meva aplicació" * ), * @OA\Property( - * property="es", + * property="description", * type="string", - * example="Título de mi aplicación" + * example="Descripció de la meva aplicació" * ), * ), * @OA\Property( - * property="description", + * property="es", * type="object", * @OA\Property( - * property="ca", + * property="title", * type="string", - * example="Descripció de la meva aplicació" + * example="Título de mi aplicación" * ), * @OA\Property( - * property="es", + * property="description", * type="string", * example="Descripción de mi aplicación" * ), @@ -133,31 +133,31 @@ public function show() {} * mediaType="application/json", * @OA\Schema( * @OA\Property( - * property="title", + * property="ca", * type="object", * @OA\Property( - * property="ca", + * property="title", * type="string", - * example="New Catalan title" + * example="Nou títol" * ), * @OA\Property( - * property="es", + * property="description", * type="string", - * example="New Spanish title" + * example="Nova descripció" * ), * ), * @OA\Property( - * property="description", + * property="es", * type="object", * @OA\Property( - * property="ca", + * property="title", * type="string", - * example="New Catalan description" + * example="Nuevo título" * ), * @OA\Property( - * property="es", + * property="description", * type="string", - * example="New Spanish description" + * example="Nueva descripción" * ), * ), * @OA\Property( diff --git a/app/Annotations/OpenApi/controllersAnnotations/faqsAnnotations/AnnotationsFaqs.php b/app/Annotations/OpenApi/controllersAnnotations/faqsAnnotations/AnnotationsFaqs.php index 59339b5..70d1ca4 100644 --- a/app/Annotations/OpenApi/controllersAnnotations/faqsAnnotations/AnnotationsFaqs.php +++ b/app/Annotations/OpenApi/controllersAnnotations/faqsAnnotations/AnnotationsFaqs.php @@ -55,29 +55,29 @@ public function show() {} * mediaType="application/json", * @OA\Schema( * @OA\Property( - * property="title", + * property="ca", * type="object", * @OA\Property( - * property="ca", + * property="title", * type="string", * example="Títol de la meva pregunta freqüent" * ), * @OA\Property( - * property="es", + * property="description", * type="string", - * example="Título de mi pregunta frecuente" + * example="Descripció de la meva pregunta freqüent" * ), * ), * @OA\Property( - * property="description", + * property="es", * type="object", * @OA\Property( - * property="ca", + * property="title", * type="string", - * example="Descripció de la meva pregunta freqüent" + * example="Título de mi pregunta frecuente" * ), * @OA\Property( - * property="es", + * property="description", * type="string", * example="Descripción de mi pregunta frecuente" * ), @@ -116,31 +116,31 @@ public function store() {} * mediaType="application/json", * @OA\Schema( * @OA\Property( - * property="title", + * property="ca", * type="object", * @OA\Property( - * property="ca", + * property="title", * type="string", - * example="New Catalan title of my FAQ" + * example="Nou títol de FAQ" * ), * @OA\Property( - * property="es", + * property="description", * type="string", - * example="New Spanish title of my FAQ" + * example="Nova descripció de FAQ" * ), * ), * @OA\Property( - * property="description", + * property="es", * type="object", * @OA\Property( - * property="ca", + * property="title", * type="string", - * example="New Catalan description of my FAQ" + * example="Nueva descripción de FAQ" * ), * @OA\Property( - * property="es", + * property="description", * type="string", - * example="New Spanish description of my FAQ" + * example="Nueva descripción de GAQ" * ), * ) * ) diff --git a/app/Models/FaqTranslation.php b/app/Models/FaqTranslation.php index 52b40e9..bd57a2c 100644 --- a/app/Models/FaqTranslation.php +++ b/app/Models/FaqTranslation.php @@ -1,4 +1,4 @@ - + array ( + 'providers' => + array ( + 0 => 'Astrotomic\\Translatable\\TranslatableServiceProvider', + ), + ), + 'darkaonline/l5-swagger' => + array ( + 'providers' => + array ( + 0 => 'L5Swagger\\L5SwaggerServiceProvider', + ), + 'aliases' => + array ( + 'L5Swagger' => 'L5Swagger\\L5SwaggerFacade', + ), + ), + 'laravel-lang/attributes' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\Attributes\\ServiceProvider', + ), + ), + 'laravel-lang/http-statuses' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\HttpStatuses\\ServiceProvider', + ), + ), + 'laravel-lang/lang' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\Lang\\ServiceProvider', + ), + ), + 'laravel-lang/publisher' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\Publisher\\ServiceProvider', + ), + ), + 'laravel/passport' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Passport\\PassportServiceProvider', + ), + ), + 'laravel/sail' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Sail\\SailServiceProvider', + ), + ), + 'laravel/sanctum' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Sanctum\\SanctumServiceProvider', + ), + ), + 'laravel/tinker' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Tinker\\TinkerServiceProvider', + ), + ), + 'laraveles/spanish' => + array ( + 'providers' => + array ( + 0 => 'Laraveles\\Spanish\\SpanishServiceProvider', + ), + ), + 'nesbot/carbon' => + array ( + 'providers' => + array ( + 0 => 'Carbon\\Laravel\\ServiceProvider', + ), + ), + 'nunomaduro/collision' => + array ( + 'providers' => + array ( + 0 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', + ), + ), + 'nunomaduro/termwind' => + array ( + 'providers' => + array ( + 0 => 'Termwind\\Laravel\\TermwindServiceProvider', + ), + ), + 'spatie/laravel-ignition' => + array ( + 'providers' => + array ( + 0 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider', + ), + 'aliases' => + array ( + 'Flare' => 'Spatie\\LaravelIgnition\\Facades\\Flare', + ), + ), +); \ No newline at end of file diff --git a/bootstrap/cache/pac2A99.tmp b/bootstrap/cache/pac2A99.tmp new file mode 100644 index 0000000..a40cd8f --- /dev/null +++ b/bootstrap/cache/pac2A99.tmp @@ -0,0 +1,115 @@ + + array ( + 'providers' => + array ( + 0 => 'Astrotomic\\Translatable\\TranslatableServiceProvider', + ), + ), + 'darkaonline/l5-swagger' => + array ( + 'providers' => + array ( + 0 => 'L5Swagger\\L5SwaggerServiceProvider', + ), + 'aliases' => + array ( + 'L5Swagger' => 'L5Swagger\\L5SwaggerFacade', + ), + ), + 'laravel-lang/attributes' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\Attributes\\ServiceProvider', + ), + ), + 'laravel-lang/http-statuses' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\HttpStatuses\\ServiceProvider', + ), + ), + 'laravel-lang/lang' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\Lang\\ServiceProvider', + ), + ), + 'laravel-lang/publisher' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\Publisher\\ServiceProvider', + ), + ), + 'laravel/passport' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Passport\\PassportServiceProvider', + ), + ), + 'laravel/sail' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Sail\\SailServiceProvider', + ), + ), + 'laravel/sanctum' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Sanctum\\SanctumServiceProvider', + ), + ), + 'laravel/tinker' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Tinker\\TinkerServiceProvider', + ), + ), + 'laraveles/spanish' => + array ( + 'providers' => + array ( + 0 => 'Laraveles\\Spanish\\SpanishServiceProvider', + ), + ), + 'nesbot/carbon' => + array ( + 'providers' => + array ( + 0 => 'Carbon\\Laravel\\ServiceProvider', + ), + ), + 'nunomaduro/collision' => + array ( + 'providers' => + array ( + 0 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', + ), + ), + 'nunomaduro/termwind' => + array ( + 'providers' => + array ( + 0 => 'Termwind\\Laravel\\TermwindServiceProvider', + ), + ), + 'spatie/laravel-ignition' => + array ( + 'providers' => + array ( + 0 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider', + ), + 'aliases' => + array ( + 'Flare' => 'Spatie\\LaravelIgnition\\Facades\\Flare', + ), + ), +); \ No newline at end of file diff --git a/bootstrap/cache/pac2A9A.tmp b/bootstrap/cache/pac2A9A.tmp new file mode 100644 index 0000000..a40cd8f --- /dev/null +++ b/bootstrap/cache/pac2A9A.tmp @@ -0,0 +1,115 @@ + + array ( + 'providers' => + array ( + 0 => 'Astrotomic\\Translatable\\TranslatableServiceProvider', + ), + ), + 'darkaonline/l5-swagger' => + array ( + 'providers' => + array ( + 0 => 'L5Swagger\\L5SwaggerServiceProvider', + ), + 'aliases' => + array ( + 'L5Swagger' => 'L5Swagger\\L5SwaggerFacade', + ), + ), + 'laravel-lang/attributes' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\Attributes\\ServiceProvider', + ), + ), + 'laravel-lang/http-statuses' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\HttpStatuses\\ServiceProvider', + ), + ), + 'laravel-lang/lang' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\Lang\\ServiceProvider', + ), + ), + 'laravel-lang/publisher' => + array ( + 'providers' => + array ( + 0 => 'LaravelLang\\Publisher\\ServiceProvider', + ), + ), + 'laravel/passport' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Passport\\PassportServiceProvider', + ), + ), + 'laravel/sail' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Sail\\SailServiceProvider', + ), + ), + 'laravel/sanctum' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Sanctum\\SanctumServiceProvider', + ), + ), + 'laravel/tinker' => + array ( + 'providers' => + array ( + 0 => 'Laravel\\Tinker\\TinkerServiceProvider', + ), + ), + 'laraveles/spanish' => + array ( + 'providers' => + array ( + 0 => 'Laraveles\\Spanish\\SpanishServiceProvider', + ), + ), + 'nesbot/carbon' => + array ( + 'providers' => + array ( + 0 => 'Carbon\\Laravel\\ServiceProvider', + ), + ), + 'nunomaduro/collision' => + array ( + 'providers' => + array ( + 0 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', + ), + ), + 'nunomaduro/termwind' => + array ( + 'providers' => + array ( + 0 => 'Termwind\\Laravel\\TermwindServiceProvider', + ), + ), + 'spatie/laravel-ignition' => + array ( + 'providers' => + array ( + 0 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider', + ), + 'aliases' => + array ( + 'Flare' => 'Spatie\\LaravelIgnition\\Facades\\Flare', + ), + ), +); \ No newline at end of file diff --git a/storage/api-docs/api-docs.json b/storage/api-docs/api-docs.json index 3bd8943..8a0a16f 100644 --- a/storage/api-docs/api-docs.json +++ b/storage/api-docs/api-docs.json @@ -38,26 +38,26 @@ "application/json": { "schema": { "properties": { - "title": { + "ca": { "properties": { - "ca": { + "title": { "type": "string", "example": "Títol de la meva aplicació" }, - "es": { + "description": { "type": "string", - "example": "Título de mi aplicación" + "example": "Descripció de la meva aplicació" } }, "type": "object" }, - "description": { + "es": { "properties": { - "ca": { + "title": { "type": "string", - "example": "Descripció de la meva aplicació" + "example": "Título de mi aplicación" }, - "es": { + "description": { "type": "string", "example": "Descripción de mi aplicación" } @@ -155,28 +155,28 @@ "application/json": { "schema": { "properties": { - "title": { + "ca": { "properties": { - "ca": { + "title": { "type": "string", - "example": "New Catalan title" + "example": "Nou títol" }, - "es": { + "description": { "type": "string", - "example": "New Spanish title" + "example": "Nova descripció" } }, "type": "object" }, - "description": { + "es": { "properties": { - "ca": { + "title": { "type": "string", - "example": "New Catalan description" + "example": "Nuevo título" }, - "es": { + "description": { "type": "string", - "example": "New Spanish description" + "example": "Nueva descripción" } }, "type": "object" @@ -461,26 +461,26 @@ "application/json": { "schema": { "properties": { - "title": { + "ca": { "properties": { - "ca": { + "title": { "type": "string", "example": "Títol de la meva pregunta freqüent" }, - "es": { + "description": { "type": "string", - "example": "Título de mi pregunta frecuente" + "example": "Descripció de la meva pregunta freqüent" } }, "type": "object" }, - "description": { + "es": { "properties": { - "ca": { + "title": { "type": "string", - "example": "Descripció de la meva pregunta freqüent" + "example": "Título de mi pregunta frecuente" }, - "es": { + "description": { "type": "string", "example": "Descripción de mi pregunta frecuente" } @@ -561,28 +561,28 @@ "application/json": { "schema": { "properties": { - "title": { + "ca": { "properties": { - "ca": { + "title": { "type": "string", - "example": "New Catalan title of my FAQ" + "example": "Nou títol de FAQ" }, - "es": { + "description": { "type": "string", - "example": "New Spanish title of my FAQ" + "example": "Nova descripció de FAQ" } }, "type": "object" }, - "description": { + "es": { "properties": { - "ca": { + "title": { "type": "string", - "example": "New Catalan description of my FAQ" + "example": "Nueva descripción de FAQ" }, - "es": { + "description": { "type": "string", - "example": "New Spanish description of my FAQ" + "example": "Nueva descripción de GAQ" } }, "type": "object" From 152776382a8639c1f9d2819fe76fd320a95de8b7 Mon Sep 17 00:00:00 2001 From: dustisme Date: Mon, 6 Nov 2023 14:32:34 +0100 Subject: [PATCH 23/33] format MultilanguageTest to follow per specifications --- tests/Feature/MultilanguageTest.php | 49 ++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/tests/Feature/MultilanguageTest.php b/tests/Feature/MultilanguageTest.php index e259c23..a2fbbf7 100644 --- a/tests/Feature/MultilanguageTest.php +++ b/tests/Feature/MultilanguageTest.php @@ -23,7 +23,9 @@ public function get_validation_error_in_multiple_languages(): void $response1 = $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('app.store'),); $response1->assertStatus(500)->assertSee('El camp url'); - $response2 = $this->withHeaders(['Authorization' => 'Bearer ' . $token, 'Accept-Language' => 'es'])->postJson(route('app.store'),); + $response2 = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $token, 'Accept-Language' => 'es' + ])->postJson(route('app.store'),); $response2->assertStatus(500)->assertSee('El campo url'); } @@ -42,7 +44,9 @@ public function create_multilanguage_app_as_authenticated_user(): void 'state' => 'COMPLETED' ]; - $response = $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->postJson(route('app.store'), $app); + $response = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $this->authCreated() + ])->postJson(route('app.store'), $app); $response->assertSee('El juego de las sillas'); $response->assertStatus(201); } @@ -58,7 +62,9 @@ public function create_multilanguage_faq_as_authenticated_user(): void 'description' => 'Juego con más de un jugador que consiste en...'], ]; - $response = $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->postJson(route('faq.store'), $faq); + $response = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $this->authCreated() + ])->postJson(route('faq.store'), $faq); $response->assertSee('consiste el juego de las sillas'); $response->assertStatus(201); } @@ -83,7 +89,9 @@ public function update_multilanguage_app_as_authenticated_user(): void $target_id = $response1['id']; $modifications = ['ca' => ['title' => 'El joc de les taules']]; - $response2 = $this->withHeaders(['Authorization' => 'Bearer ' . $token])->putJson(route('app.update', ['id' => $target_id]), $modifications); + $response2 = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $token + ])->putJson(route('app.update', ['id' => $target_id]), $modifications); $response2->assertStatus(200); @@ -100,11 +108,12 @@ public function update_multilanguage_faq_as_authenticated_user(): void ]; $token = $this->authCreated(); + $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('faq.store'), $faq); - $response1 = $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('faq.store'), $faq); - $modifications = ['es' => ['title' => '¿En qué consiste el juego de las mesas?']]; - $response2 = $this->withHeaders(['Authorization' => 'Bearer ' . $token])->putJson(route('faq.update', ['id' => 1]), $modifications); + $response2 = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $token + ])->putJson(route('faq.update', ['id' => 1]), $modifications); $response2->assertStatus(200); @@ -124,14 +133,20 @@ public function get_app_in_multiple_languages_as_authenticated_user(): void ]; $token = $this->authCreated(); - $response1 = $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('app.store'), $app); + $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('app.store'), $app); - $response2 = $this->withHeaders(['Authorization' => 'Bearer ' . $token, 'Accept-Language' => 'ca'])->getJson(route('app.show', ['id' => 1])); + $response2 = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $token, + 'Accept-Language' => 'ca' + ])->getJson(route('app.show', ['id' => 1])); $response2->assertStatus(200)->assertSee('joc'); - $response3 = $this->withHeaders(['Authorization' => 'Bearer ' . $token, 'Accept-Language' => 'es'])->getJson(route('app.show', ['id' => 1])); + $response3 = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $token, + 'Accept-Language' => 'es' + ])->getJson(route('app.show', ['id' => 1])); $response3->assertStatus(200)->assertSee('juego'); } @@ -147,14 +162,20 @@ public function get_faq_in_multiple_languages_as_authenticated_user(): void ]; $token = $this->authCreated(); - $response1 = $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('faq.store'), $faq); + $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('faq.store'), $faq); - $response2 = $this->withHeaders(['Authorization' => 'Bearer ' . $token, 'Accept-Language' => 'ca'])->getJson(route('faq.show', ['id' => 1])); + $response2 = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $token, + 'Accept-Language' => 'ca' + ])->getJson(route('faq.show', ['id' => 1])); $response2->assertStatus(200)->assertSee('joc'); - $response3 = $this->withHeaders(['Authorization' => 'Bearer ' . $token, 'Accept-Language' => 'es'])->getJson(route('faq.show', ['id' => 1])); + $response3 = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $token, + 'Accept-Language' => 'es' + ])->getJson(route('faq.show', ['id' => 1])); $response3->assertStatus(200)->assertSee('juego'); } @@ -173,7 +194,7 @@ private function authCreated() 'status' => 'ACTIVE', 'role' => 'ADMIN', ]); - return $token = $user->createToken('auth_token')->accessToken; + return $user->createToken('auth_token')->accessToken; } From b52cbeec10825c4a64799c019c76a6ab877d818a Mon Sep 17 00:00:00 2001 From: dustisme Date: Thu, 9 Nov 2023 18:55:22 +0100 Subject: [PATCH 24/33] AppTest working --- app/Exceptions/Handler.php | 26 ++--- app/Http/Controllers/api/AppController.php | 20 ++-- tests/Feature/AppTest.php | 115 ++++++++++++++------- 3 files changed, 103 insertions(+), 58 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 0e3f368..5c3a373 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -52,19 +52,21 @@ public function register(): void public function render($request, Throwable $exception) { - if ($exception instanceof ModelNotFoundException) { - return response()->json(['error' => 'Resource not found'], Response::HTTP_NOT_FOUND); + switch(true) { + case $exception instanceof ModelNotFoundException: + return response()->json(['error' => 'Resource not found.'], 204); + break; + case $exception instanceof ValidationException: + return response()->json(['error'=> $exception->getMessage()], 422); + break; + case $exception instanceof HttpException: + return response()->json([ + 'error'=> 'Something wrong with the server: ' . $exception->getMessage() + ], 500); + break; + default: + return parent::render($request, $exception); } - - if ($exception instanceof ValidationException) { - return response()->json(['error' => $exception->getMessage()], Response::HTTP_INTERNAL_SERVER_ERROR); - } - - if ($exception instanceof HttpException) { - return response()->json(['error' => 'Somethings wrong with the server: '.$exception->getMessage()], Response::HTTP_INTERNAL_SERVER_ERROR); - } - - return parent::render($request, $exception); } } diff --git a/app/Http/Controllers/api/AppController.php b/app/Http/Controllers/api/AppController.php index 861a15d..f27b537 100644 --- a/app/Http/Controllers/api/AppController.php +++ b/app/Http/Controllers/api/AppController.php @@ -26,8 +26,8 @@ public function store(Request $request) ]); $rules = RuleFactory::make([ - '%title%' => ['required', 'string', 'max:255'], - '%description%' => ['required_with:"%title%"', 'string'], + '%title%' => 'required|string|max:255', + '%description%' => 'required_with:"%title%"|string', ]); $validatedData += $request->validate($rules); @@ -52,27 +52,31 @@ public function show($id) public function update(Request $request, $id) { - $app = App::find($id); + $app = App::find($id); if (!$app) { return response()->json(['error' => __('api.app_not_found')], 404); } $validatedData = $request->validate([ - 'url' => 'url', - 'github' => 'url', + 'url' => 'url:http,https', + 'github' => 'url:http,https', 'state' => 'in:COMPLETED,IN PROGRESS,SOON', ]); $rules = RuleFactory::make([ - '%title%' => ['string', 'max:255'], + '%title%' => ['required', 'string', 'max:255'], '%description%' => ['string'], ]); $validatedData += $request->validate($rules); - $app->update($validatedData); - return response()->json(['message' => __('api.app_updated')], 200); + if ($app->update($validatedData)) { + return response()->json(['message' => __('api.app_updated')], 200); + } else { + return response()->json(['error' => __('api.update_failed')], 422); + } + } public function destroy($id) diff --git a/tests/Feature/AppTest.php b/tests/Feature/AppTest.php index bdd8cc6..f491929 100644 --- a/tests/Feature/AppTest.php +++ b/tests/Feature/AppTest.php @@ -2,11 +2,12 @@ namespace Tests\Feature; -use Illuminate\Foundation\Testing\RefreshDatabase; -use Illuminate\Foundation\Testing\WithFaker; -use Tests\TestCase; use App\Models\App; +use Tests\TestCase; use App\Models\User; +use Illuminate\Support\Facades\Artisan; +use Illuminate\Foundation\Testing\WithFaker; +use Illuminate\Foundation\Testing\RefreshDatabase; class AppTest extends TestCase { @@ -27,7 +28,9 @@ public function test_can_get_all_apps_authenticated_user(): void { App::factory(3)->create(); - $response = $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->getJson(route('app.index')); + $response = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $this->authCreated() + ])->getJson(route('app.index')); $response->assertStatus(200); $response->json(); @@ -36,16 +39,23 @@ public function test_can_get_all_apps_authenticated_user(): void public function test_can_store_an_app_with_valid_data(): void { $app = [ - 'title' => fake()->title(), - 'description' => fake()->text(), + 'ca' => [ + 'title' => fake()->title(), + 'description' => fake()->text() + ], + 'es' => [ + 'title' => fake()->title(), + 'description' => fake()->text(), + ], 'url' => fake()->url(), 'github' => 'https://github.com', 'state' => fake()->randomElement(['COMPLETED', 'IN PROGRESS', 'SOON']) ]; - - $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->postJson(route('app.store'), $app); - - $this->assertDatabaseHas('apps', $app); + + $response = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $this->authCreated() + ])->postJson(route('app.store'), $app); + $response->assertStatus(201); } public function test_can_not_store_an_app_without_token(): void @@ -66,14 +76,15 @@ public function test_can_not_store_an_app_without_token(): void public function test_can_not_store_an_app_with_a_missing_field(): void { $app = [ - 'title' => '', 'description' => fake()->text(), 'url' => fake()->url(), 'github' => 'https://github.com', 'state' => fake()->randomElement(['COMPLETED', 'IN PROGRESS', 'SOON']) ]; - $response = $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->postJson(route('app.store'), $app); + $response = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $this->authCreated() + ])->postJson(route('app.store'), $app); $response->assertStatus(422); } @@ -83,14 +94,17 @@ public function test_can_not_store_an_app_with_wrong_data(): void $app = [ 'title' => fake()->title(), 'description' => fake()->text(), - 'url' => 123355, // must be text + 'url' => 12345, 'github' => 'https://github.com', 'state' => fake()->randomElement(['COMPLETED', 'IN PROGRESS', 'SOON']) ]; - $response = $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->postJson(route('app.store'), $app); - - $response->assertJsonValidationErrorFor('url'); + $response = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $this->authCreated() + ])->postJson(route('app.store'), $app); + + $response->assertStatus(422); + $response->assertJsonFragment(['error' => 'Url no és una adreça web vàlida.']); } @@ -104,7 +118,9 @@ public function test_can_not_store_an_app_with_empty_fields(): void 'state' => [], ]; - $response = $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->postJson(route('app.store'), $app); + $response = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $this->authCreated() + ])->postJson(route('app.store'), $app); $response->assertStatus(422); } @@ -113,7 +129,9 @@ public function test_can_show_an_app(): void { $app = App::factory()->create(); - $response = $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->getJson(route('app.show', $app)); + $response = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $this->authCreated() + ])->getJson(route('app.show', $app)); $response->assertJson([ 'title' => $app->title, @@ -137,26 +155,42 @@ public function test_can_not_show_an_app_that_it_doesnt_exists(): void { App::factory()->create(); - $response = $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->getJson(route('app.show', ['id' => '2'])); + $response = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $this->authCreated() + ])->getJson(route('app.show', ['id' => '2'])); $response->assertStatus(404); } public function test_can_update_an_app_with_valid_data(): void { - $app = App::factory()->create(); + $app = [ + 'ca' => ['title' => 'El joc de les cadires', + 'description' => 'Joc amb més d\'un jugador que consisteix en...'], + 'es' => ['title' => 'El juego de las sillas', + 'description' => 'Juego con más de un jugador que consiste en...'], + 'url' => 'https://chairgame.com', + 'github' => 'https://github.com', + 'state' => 'COMPLETED' + ]; - $newData = [ - 'title' => 'Title updated', - 'description' => $app->description, - 'url' => $app->url, - 'github' => $app->github, - 'state' => $app->state, + $token = $this->authCreated(); + + $response1 = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $token + ])->postJson(route('app.store'), $app); + + $target_id = $response1['id']; + $modifications = [ + 'ca' => ['title' => 'El joc de les taules'], + 'es' => ['title' => 'El juego de las sillas'] ]; + + $response2 = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $token + ])->putJson(route('app.update', ['id' => $target_id]), $modifications); - $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->putJson(route('app.update', $app->id), $newData); - - $this->assertDatabaseHas('apps', $newData); + $response2->assertStatus(200); } public function test_can_not_update_an_app_without_token(): void @@ -173,31 +207,34 @@ public function test_can_not_update_an_app_without_token(): void $response = $this->putJson(route('app.update', $app->id), $newData); - $response->assertStatus(401); + $response->assertStatus(401); } public function test_can_not_update_an_app_with_missing_field(): void - { + { $app = App::factory()->create(); $newData = [ - 'title' => '', 'description' => $app->description, 'url' => $app->url, 'github' => $app->github, 'state' => $app->state, ]; - $response = $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->putJson(route('app.update', $app->id), $newData); + $response = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $this->authCreated() + ])->putJson(route('app.update', $app->id), $newData); - $response->assertStatus(422); + $response->assertStatus(422); } public function test_can_delete_an_app(): void { $app = App::factory()->create(); - $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->deleteJson(route('app.destroy', $app)); + $this->withHeaders([ + 'Authorization' => 'Bearer ' . $this->authCreated() + ])->deleteJson(route('app.destroy', $app)); $this->assertDatabaseCount('apps', 0); } @@ -206,7 +243,9 @@ public function test_can_not_delete_an_app_that_it_doesnt_exists(): void { App::factory()->create(); - $response = $this->withHeaders(['Authorization' => 'Bearer ' . $this->authCreated()])->deleteJson(route('app.destroy', ['id' => '2'])); + $response = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $this->authCreated() + ])->deleteJson(route('app.destroy', ['id' => '2'])); $response->assertStatus(404); } @@ -222,7 +261,7 @@ public function test_can_not_delete_an_app_without_token(): void private function authCreated() { - \Artisan::call('passport:install'); + Artisan::call('passport:install'); $user = User::create([ 'name' => 'Gabriela', @@ -232,7 +271,7 @@ private function authCreated() 'status' => 'ACTIVE', 'role' => 'ADMIN', ]); - return $token = $user->createToken('auth_token')->accessToken; + return $user->createToken('auth_token')->accessToken; } From a1d4fdcc18ab1e6675c050fdcbfac6a0dbfe3086 Mon Sep 17 00:00:00 2001 From: dustisme Date: Tue, 21 Nov 2023 11:44:22 +0100 Subject: [PATCH 25/33] Add annotations to exclude from massive testing --- tests/Feature/SendEmailTest.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/Feature/SendEmailTest.php b/tests/Feature/SendEmailTest.php index 060b8bc..8b11529 100644 --- a/tests/Feature/SendEmailTest.php +++ b/tests/Feature/SendEmailTest.php @@ -12,6 +12,10 @@ class SendEmailTest extends TestCase { use RefreshDatabase; + /** + * @test + * @group SendEmailTest + */ public function test_ok_Response_when_email_is_sended_with_valid_email() { $user = User::factory()->create(); @@ -22,6 +26,10 @@ public function test_ok_Response_when_email_is_sended_with_valid_email() } + /** + * @test + * @group SendEmailTest + */ public function test_email_is_not_sended_with_invalid_email() { $user = User::factory()->create(); @@ -30,7 +38,11 @@ public function test_email_is_not_sended_with_invalid_email() $response->assertStatus(400); } - + + /** + * @test + * @group SendEmailTest + */ public function test_email_is_sent_to_the_specified_email() { Mail::fake(); From da8e2ad651767ad8d8bcc045d2025716ccd74814 Mon Sep 17 00:00:00 2001 From: dustisme Date: Tue, 21 Nov 2023 11:45:58 +0100 Subject: [PATCH 26/33] update Login, register and reset password test. Update User and Auth controller accordingly. --- app/Http/Controllers/api/AuthController.php | 13 ++- app/Http/Controllers/api/UserController.php | 107 ++++++++++---------- app/Rules/Dni.php | 4 +- tests/Feature/LoginTest.php | 21 ++-- tests/Feature/RegisterTest.php | 4 + tests/Feature/ResetPasswordTest.php | 22 ++-- 6 files changed, 89 insertions(+), 82 deletions(-) diff --git a/app/Http/Controllers/api/AuthController.php b/app/Http/Controllers/api/AuthController.php index 1619603..ebc39a5 100644 --- a/app/Http/Controllers/api/AuthController.php +++ b/app/Http/Controllers/api/AuthController.php @@ -28,9 +28,18 @@ public function login(Request $request) $user = Auth::user(); $token = $user->createToken('authToken')->accessToken; - return response()->json(['result' => ['message' => __('auth.success'), 'access_token' => $token], 'status' => true]); + return response()->json([ + 'result' => [ + 'message' => __('auth.success'), 'access_token' => $token + ], + 'status' => true + ]); } else { - return response()->json(['result' => ['message' => __('auth:failed')], 'status' => false], 401); + return response()->json([ + 'result' => [ + 'message' => __('auth.failed')], + 'status' => false + ], 401); } } diff --git a/app/Http/Controllers/api/UserController.php b/app/Http/Controllers/api/UserController.php index 0475e2f..4f25909 100644 --- a/app/Http/Controllers/api/UserController.php +++ b/app/Http/Controllers/api/UserController.php @@ -26,7 +26,7 @@ public function store(Request $request) try { $validatedData = $request->validate([ 'email' => 'required|string|email|max:255|unique:users', - 'name' => 'string|max:255', + 'name' => 'nullable|string|max:255', 'dni' => ['required','unique:users',new Dni], 'password' => 'required|string|min:8|confirmed', 'code' => 'required|exists:codes,code,is_used,0' @@ -34,13 +34,13 @@ public function store(Request $request) // Create a new user. $user = User::create([ - 'email' => $request->email, - 'name' => $request->name, - 'dni' => strtoupper($request->dni), - 'password' => Hash::make($request->password), + 'email' => $validatedData['email'], + 'name' => $validatedData['name'], + 'dni' => strtoupper($validatedData['dni']), + 'password' => Hash::make($validatedData['password']), 'status' => 'ACTIVE', 'role' => 'ADMIN', - 'code' => $request->code, + 'code' => $validatedData['code'], ]); $this->is_usedUpdated($request->code, $user->id); @@ -52,6 +52,7 @@ public function store(Request $request) ], 'status' => true ]); + } catch (ValidationException $e) { return response()->json( [ @@ -66,7 +67,7 @@ private function is_usedUpdated($code, $userId) $code = Code::where('code', $code)->where('is_used', false)->first(); if(!$code) { - return response()->json(['error' => __('auth.invalid_code')],404); + return response()->json(['error' => __('auth.invalid_code')], 404); } $code->is_used = true; @@ -75,69 +76,69 @@ private function is_usedUpdated($code, $userId) } - public function forgetPassword(ForgetRequest $request){ + public function forgetPassword(ForgetRequest $request){ - $email = $request->email; + $email = $request->email; - try{ - // check if user with such email exists - $user= User::where('email',$email)->first(); + try{ + // check if user with such email exists + $user = User::where('email', $email)->first(); - if(!$user){ - return response()->json(['error' => __('passwords.user')],404); - } + if(!$user){ + return response()->json(['error' => __('passwords.user')], 204); + } - // Generate password reset token - $token= Str::random(10); + // Generate password reset token + $token= Str::random(10); - // Assign password reset token to user's email in 'password_reset_token' table - if(DB::table('password_reset_tokens')->where('email', $email)->first()) { - DB::table('password_reset_tokens')->where('email', $email)->update([ 'token' => $token, ]); - } else { - DB::table('password_reset_tokens')->insert([ - 'email' => $email, - 'token' => $token - ]); - }; + // Assign password reset token to user's email in 'password_reset_token' table + if(DB::table('password_reset_tokens')->where('email', $email)->first()) { + DB::table('password_reset_tokens')->where('email', $email)->update([ 'token' => $token, ]); + } else { + DB::table('password_reset_tokens')->insert([ + 'email' => $email, + 'token' => $token + ]); + } - //send password reset email - Mail::to($email)->send(new ForgetPasswordMail($user->name, $token)); + //send password reset email + Mail::to($email)->send(new ForgetPasswordMail($user->name, $token)); - // send confirmation response - return response()->json(['message'=> __('passwords.sent')],200); - + // send confirmation response + return response()->json(['message'=> __('passwords.sent')], 200); + - }catch(Exception $exception){ + }catch(Exception $exception){ - return response()->json(['message' => $exception->getMessage()],404); + return response()->json(['message' => $exception->getMessage()], 404); + + } } -} + public function resetPassword(ResetRequest $request){ - public function resetPassword(ResetRequest $request){ + $token = $request->route('token'); - $token = $request->route('token'); + $passwordResets= DB::table('password_reset_tokens')->where('token', $token)->first(); + + if(!$passwordResets){ - $passwordResets= DB::table('password_reset_tokens')->where('token', $token)->first(); - - - if(!$passwordResets){ + return response()->json([ + 'error' => __('passwords.token') + ],400); + } - return response()->json([ - 'error' => __('passwords.token') - ],400); - } - /** @var User $user */ - $user= User::where('email',$passwordResets->email)->first(); - $user->password = Hash::make($request->password); - $user->save(); - DB::table('password_reset_tokens')->where('email', $passwordResets->email)->delete(); + /** @var User $user */ + $user = User::where('email', $passwordResets->email)->first(); + $user->password = Hash::make($request->password); + $user->save(); + DB::table('password_reset_tokens')->where('email', $passwordResets->email)->delete(); - return response()->json([ - 'message' => __('passwords.reset') - ],200); + return response()->json([ + 'message' => __('passwords.reset') + ],200); -} + } } diff --git a/app/Rules/Dni.php b/app/Rules/Dni.php index 17f1284..3b575b1 100644 --- a/app/Rules/Dni.php +++ b/app/Rules/Dni.php @@ -28,7 +28,7 @@ public function isValidNif($nif) $letters = "TRWAGMYFPDXBNJZSQVHLCKE"; if (preg_match($nifRegEx, $nif)) { - return ($letters[(substr($nif, 0, 8) % 23)] == $nif[8]); + return $letters[(substr($nif, 0, 8) % 23)] == $nif[8]; } return false; @@ -46,7 +46,7 @@ public function isValidNie($nif) $r = str_replace(['X', 'Y', 'Z'], [0, 1, 2], $nif); - return ($letters[(substr($r, 0, 8) % 23)] == $nif[8]); + return $letters[(substr($r, 0, 8) % 23)] == $nif[8]; } return false; diff --git a/tests/Feature/LoginTest.php b/tests/Feature/LoginTest.php index 7caccfc..ca7eb1e 100644 --- a/tests/Feature/LoginTest.php +++ b/tests/Feature/LoginTest.php @@ -2,9 +2,10 @@ namespace Tests\Feature; -use Illuminate\Foundation\Testing\RefreshDatabase; -use App\Models\User; use Tests\TestCase; +use App\Models\User; +use Illuminate\Support\Facades\Artisan; +use Illuminate\Foundation\Testing\RefreshDatabase; class LoginTest extends TestCase { @@ -16,7 +17,7 @@ class LoginTest extends TestCase */ public function test_a_user_can_be_logged_in(): void { - \Artisan::call('passport:install'); + Artisan::call('passport:install'); User::create([ 'name' => 'Gabriela', @@ -42,7 +43,7 @@ public function test_a_user_can_be_logged_in(): void ]); $this->assertAuthenticated(); - } + } /** * A user can not be logged in successfully with a invalid credentials @@ -50,8 +51,6 @@ public function test_a_user_can_be_logged_in(): void */ public function test_a_user_can_not_be_logged_in_with_both_fields_wrong(): void { - \Artisan::call('passport:install'); - User::create([ 'name' => 'Gabriela', 'email' => 'gaby@gmail.com', @@ -69,7 +68,7 @@ public function test_a_user_can_not_be_logged_in_with_both_fields_wrong(): void $response->assertStatus(401); $response->assertJson([ 'result' => [ - 'message' => 'Invalid credentials' + 'message' => __('auth.failed') ], 'status' => false ]); @@ -94,8 +93,6 @@ public function test_a_user_cannot_be_logged_in_with_missing_fields(): void */ public function test_a_user_cannot_be_logged_in_with_wrong_password(): void { - \Artisan::call('passport:install'); - User::create([ 'name' => 'Gabriela', 'email' => 'gaby@gmail.com', @@ -113,7 +110,7 @@ public function test_a_user_cannot_be_logged_in_with_wrong_password(): void $response->assertStatus(401); $response->assertJson([ 'result' => [ - 'message' => 'Invalid credentials' + 'message' => __('auth.failed') ], 'status' => false ]); @@ -126,8 +123,6 @@ public function test_a_user_cannot_be_logged_in_with_wrong_password(): void */ public function test_a_user_cannot_be_logged_in_with_wrong_dni(): void { - \Artisan::call('passport:install'); - User::create([ 'name' => 'Gabriela', 'email' => 'gaby@gmail.com', @@ -145,7 +140,7 @@ public function test_a_user_cannot_be_logged_in_with_wrong_dni(): void $response->assertStatus(401); $response->assertJson([ 'result' => [ - 'message' => 'Invalid credentials' + 'message' => __('auth.failed') ], 'status' => false ]); diff --git a/tests/Feature/RegisterTest.php b/tests/Feature/RegisterTest.php index 8df4c0f..2e08ab6 100644 --- a/tests/Feature/RegisterTest.php +++ b/tests/Feature/RegisterTest.php @@ -105,6 +105,7 @@ public function test_store_with_valid_data_and_without_name(): void $response = $this->post('/api/register', [ 'email' => $userData['email'], + 'name' => null, 'dni' => $userData['dni'], 'password' => $userData['password'], 'password_confirmation' => $userData['password'], @@ -113,6 +114,9 @@ public function test_store_with_valid_data_and_without_name(): void $response->assertStatus(200) ->assertJson([ + 'result' => [ + 'message' => __('auth.registered') + ], 'status' => true, ]); diff --git a/tests/Feature/ResetPasswordTest.php b/tests/Feature/ResetPasswordTest.php index d1eb0e2..7460090 100644 --- a/tests/Feature/ResetPasswordTest.php +++ b/tests/Feature/ResetPasswordTest.php @@ -38,21 +38,19 @@ public function test_user_cant_ask_for_the_email_cause_the_email_dont_exist(): v 'email'=> 'prueba@prueba.com' ]); - $response->assertStatus(404)->assertJsonStructure([ - 'error' - ]); + $response->assertStatus(204); } public function test_updating_token_for_an_existing_email_on_reset_password_table(): void { - $user= User::factory()->create(); - $email= $user->email; - $token= Str::random(10); + $user = User::factory()->create(); + $email = $user->email; + $token = Str::random(10); DB::table('password_reset_tokens')->insert([ 'email' => $email, 'token' => $token - ]); + ]); $response = $this->post(route('forget.password'),[ 'email'=> $email @@ -75,8 +73,8 @@ public function test_user_can_reset_password(): void ]); $response = $this->post(route('reset.password',$token),[ - 'password' =>"newpassword", - 'password_confirm' => "newpassword" + 'password' => 'newpassword', + 'password_confirmation' => 'newpassword' ]); $response->assertStatus(200)->assertJsonStructure([ @@ -98,10 +96,10 @@ public function test_user_cant_reset_password_cause_put_it_wrong(): void $response = $this->post(route('reset.password',$token),[ 'token'=> $token, 'password' =>"newpassword", - 'password_confirm' => "newpawwrodd" + 'password_confirmation' => "newpawwrodd" ]); - $response->assertStatus(302); + $response->assertStatus(422); } public function test_user_have_wrong_token(): void @@ -118,7 +116,7 @@ public function test_user_have_wrong_token(): void $response = $this->post(route('reset.password',$token),[ 'token'=> $token, 'password' =>"newpassword", - 'password_confirm' => "newpassword" + 'password_confirmation' => "newpassword" ]); $response->assertStatus(400)->assertJsonStructure([ From 8c3112814282923b127e90b5292048c6fbe86b4f Mon Sep 17 00:00:00 2001 From: dustisme Date: Tue, 21 Nov 2023 11:47:18 +0100 Subject: [PATCH 27/33] update App controller and multilanguage test. add name routes to faq index. add new error message in ca directory. --- app/Http/Controllers/api/AppController.php | 44 +++++++++++----------- resources/lang/ca/api.php | 4 +- routes/api.php | 2 +- tests/Feature/MultilanguageTest.php | 9 +++-- 4 files changed, 33 insertions(+), 26 deletions(-) diff --git a/app/Http/Controllers/api/AppController.php b/app/Http/Controllers/api/AppController.php index f27b537..9150936 100644 --- a/app/Http/Controllers/api/AppController.php +++ b/app/Http/Controllers/api/AppController.php @@ -6,7 +6,7 @@ use Illuminate\Http\Request; use App\Models\App; use Astrotomic\Translatable\Validation\RuleFactory; - +use Exception; class AppController extends Controller { @@ -52,29 +52,31 @@ public function show($id) public function update(Request $request, $id) { - $app = App::find($id); + try { + $app = App::find($id); - if (!$app) { - return response()->json(['error' => __('api.app_not_found')], 404); - } + if (!$app) { + return response()->json(['error'=> __('api.app_not_found')],204); + } - $validatedData = $request->validate([ - 'url' => 'url:http,https', - 'github' => 'url:http,https', - 'state' => 'in:COMPLETED,IN PROGRESS,SOON', - ]); - - $rules = RuleFactory::make([ - '%title%' => ['required', 'string', 'max:255'], - '%description%' => ['string'], - ]); - - $validatedData += $request->validate($rules); + $rules = RuleFactory::make([ + '%title%' => ['required', 'string', 'max:255'], + '%description%' => ['string'] + ]); + + $validatedData = $request->validate([ + 'url' => 'url:http,https', + 'github' => 'url:http,https', + 'state' => 'in:COMPLETED,IN PROGRESS,SOON' + ]); + + $validatedData += $request->validate($rules); + + $app->update($validatedData); + return response()->json(['message' => __('api.app_updated'), 200]); - if ($app->update($validatedData)) { - return response()->json(['message' => __('api.app_updated')], 200); - } else { - return response()->json(['error' => __('api.update_failed')], 422); + } catch (Exception $e) { + return response()->json(['error'=> $e->getMessage()], 422); } } diff --git a/resources/lang/ca/api.php b/resources/lang/ca/api.php index 366aedc..211aed3 100644 --- a/resources/lang/ca/api.php +++ b/resources/lang/ca/api.php @@ -14,9 +14,11 @@ 'app_deleted' => 'App eliminada correctament.', 'app_not_found' => 'App no trobada a la base de dades.', 'app_updated' => 'App actualitzada correctament.', + 'app_failed' => 'Error en l\'actualització de la app.', /** Faq */ 'faq_deleted' => 'Faq eliminada correctament.', 'faq_not_found' => 'Faq no trobada a la base de dades.', 'faq_updated' => 'Faq actualitzada correctament.', -]; \ No newline at end of file + 'faq_failed' => 'Error en l\'actualització de la faq.', +]; diff --git a/routes/api.php b/routes/api.php index 79063c7..a8f68e6 100644 --- a/routes/api.php +++ b/routes/api.php @@ -28,7 +28,7 @@ Route::post('/forget-password', [UserController::class, 'forgetPassword'])->name('forget.password'); Route::post('/reset-password/{token}', [UserController::class, 'resetPassword'])->name('reset.password'); - Route::get('/faqs', [FaqController::class, 'index']); + Route::get('/faqs', [FaqController::class, 'index'])->name('faq.index'); Route::get('/apps', [AppController::class, 'index'])->name('app.index'); Route::get('/collaborators/{area}',[CollaboratorsController::class,'index']); diff --git a/tests/Feature/MultilanguageTest.php b/tests/Feature/MultilanguageTest.php index a2fbbf7..feff56d 100644 --- a/tests/Feature/MultilanguageTest.php +++ b/tests/Feature/MultilanguageTest.php @@ -21,12 +21,12 @@ public function get_validation_error_in_multiple_languages(): void $token = $this->authCreated(); $response1 = $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('app.store'),); - $response1->assertStatus(500)->assertSee('El camp url'); + $response1->assertStatus(422)->assertSee('El camp url'); $response2 = $this->withHeaders([ 'Authorization' => 'Bearer ' . $token, 'Accept-Language' => 'es' ])->postJson(route('app.store'),); - $response2->assertStatus(500)->assertSee('El campo url'); + $response2->assertStatus(422)->assertSee('El campo url'); } @@ -88,7 +88,10 @@ public function update_multilanguage_app_as_authenticated_user(): void $target_id = $response1['id']; - $modifications = ['ca' => ['title' => 'El joc de les taules']]; + $modifications = [ + 'ca' => ['title' => 'El joc de les taules'], + 'es' => ['title' => 'El juego de las sillas'] + ]; $response2 = $this->withHeaders([ 'Authorization' => 'Bearer ' . $token ])->putJson(route('app.update', ['id' => $target_id]), $modifications); From c252610d622a6edca81361f841b053b5200abb0b Mon Sep 17 00:00:00 2001 From: dustisme Date: Tue, 21 Nov 2023 11:47:38 +0100 Subject: [PATCH 28/33] create Faq resource --- app/Http/Resources/FaqResource.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 app/Http/Resources/FaqResource.php diff --git a/app/Http/Resources/FaqResource.php b/app/Http/Resources/FaqResource.php new file mode 100644 index 0000000..1e8704a --- /dev/null +++ b/app/Http/Resources/FaqResource.php @@ -0,0 +1,28 @@ + + */ + public function toArray(Request $request): array + { + return [ + 'ca' => [ + 'title' => $this->resource->translations->where('locale', 'ca')->first()->title, + 'description' => $this->resource->translations->where('locale', 'ca')->first()->description, + ], + 'es' => [ + 'title' => $this->resource->translations->where('locale', 'es')->first()->title, + 'description' => $this->resource->translations->where('locale', 'es')->first()->description, + ], + ]; + } +} From 28a714b64e17c4875e7750c99bd8526f79bfd8bb Mon Sep 17 00:00:00 2001 From: dustisme Date: Tue, 21 Nov 2023 12:19:53 +0100 Subject: [PATCH 29/33] some test solved --- tests/Feature/FaqsTest.php | 116 ++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 66 deletions(-) diff --git a/tests/Feature/FaqsTest.php b/tests/Feature/FaqsTest.php index 65a3884..b32efa6 100644 --- a/tests/Feature/FaqsTest.php +++ b/tests/Feature/FaqsTest.php @@ -2,10 +2,11 @@ namespace Tests\Feature; -use Illuminate\Foundation\Testing\RefreshDatabase; +use App\Models\Faq; use Tests\TestCase; use App\Models\User; -use App\Models\Faq; +use Illuminate\Support\Facades\Artisan; +use Illuminate\Foundation\Testing\RefreshDatabase; class FaqsTest extends TestCase { @@ -15,26 +16,13 @@ class FaqsTest extends TestCase * Test index method. Unauthenticated user have access to this route too. */ public function test_index(): void - { - $faqs = [ - [ - 'title' => fake()->sentence, - 'description' => fake()->paragraph, - ], - [ - 'title' => fake()->sentence, - 'description' => fake()->paragraph, - ], - ]; - - Faq::insert($faqs); + { + Faq::factory()->count(3)->create(); - $response = $this->get('/api/faqs'); + $response = $this->getJson(route('faq.index')); + $response->assertStatus(200); + $response->json(); - $response->assertStatus(200) - ->assertJson([ - 'faqs' => $faqs - ]); } /** @@ -42,35 +30,27 @@ public function test_index(): void */ public function test_index_with_token(): void { - \Artisan::call('passport:install'); + Artisan::call('passport:install'); $user = User::factory()->create(); $token = $user->createToken('auth_token')->accessToken; - $faqs = [ - [ - 'title' => fake()->sentence, - 'description' => fake()->paragraph, - ], - [ - 'title' => fake()->sentence, - 'description' => fake()->paragraph, - ], - ]; - - Faq::insert($faqs); + Faq::factory()->count(3)->create(); - $response = $this->actingAs($user)->withHeaders(['Authorization' => 'Bearer ' . $token,])->get('/api/faqs'); + $response = $this->actingAs($user) + ->withHeaders(['Authorization' => 'Bearer ' . $token,]) + ->getJson(route('faq.index')); - $response->assertStatus(200)->assertJson(['faqs' => $faqs]); + $response->assertStatus(200); + $response->json(); } /** * Test show method. */ public function test_show() - { - \Artisan::call('passport:install'); + { + Artisan::call('passport:install'); $user = User::factory()->create(); $token = $user->createToken('TestToken')->accessToken; @@ -93,8 +73,8 @@ public function test_show() * Test show method without token. */ public function test_show_without_token() - { - \Artisan::call('passport:install'); + { + Artisan::call('passport:install'); $faq = Faq::factory()->create(); @@ -108,26 +88,30 @@ public function test_show_without_token() */ public function test_store() { - \Artisan::call('passport:install'); + Artisan::call('passport:install'); $user = User::factory()->create(); $token = $user->createToken('TestToken')->accessToken; $data = [ - 'title' => 'Test FAQ', - 'description' => 'This is a test FAQ' + 'ca' => [ + 'title' => 'Títol', + 'description' => 'Descripció' + ], + 'es' => [ + 'title' => 'Título', + 'description' => 'Descripción' + ] ]; - $response = $this->actingAs($user)->withHeaders([ - 'Authorization' => 'Bearer ' . $token, - ])->post('/api/faqs', $data); + $response = $this->actingAs($user) + ->withHeaders(['Authorization' => 'Bearer ' . $token,]) + ->post(route('faq.store'), $data); $response->assertStatus(201) ->assertJson([ 'faq' => $data ]); - - $this->assertDatabaseHas('faqs', $data); } /** @@ -135,14 +119,14 @@ public function test_store() */ public function test_store_without_token() { - \Artisan::call('passport:install'); + Artisan::call('passport:install'); $data = [ 'title' => 'Test FAQ', 'description' => 'This is a test FAQ' ]; - $response = $this->post('/api/faqs', $data); + $response = $this->post(route('faq.store'), $data); $response->assertStatus(302); } @@ -152,7 +136,7 @@ public function test_store_without_token() */ public function test_store_with_missing_fields() { - \Artisan::call('passport:install'); + Artisan::call('passport:install'); $user = User::factory()->create(); $token = $user->createToken('TestToken')->accessToken; @@ -164,10 +148,10 @@ public function test_store_with_missing_fields() $response1 = $this->actingAs($user)->withHeaders([ 'Authorization' => 'Bearer ' . $token, - ])->post('/api/faqs', $data1); + ])->post(route('faq.store'), $data1); $response1->assertStatus(422) - ->assertJsonValidationErrors(['title']); + ->assertJsonValidationErrors(['ca.title', 'es.title']); // Missing description $data2 = [ @@ -176,20 +160,20 @@ public function test_store_with_missing_fields() $response2 = $this->actingAs($user)->withHeaders([ 'Authorization' => 'Bearer ' . $token, - ])->post('/api/faqs', $data2); + ])->post(route('faq.store'), $data2); $response2->assertStatus(422) - ->assertJsonValidationErrors(['description']); + ->assertJsonValidationErrors(['ca.description', 'es.description']); // Missing title and description $data3 = []; $response3 = $this->actingAs($user)->withHeaders([ 'Authorization' => 'Bearer ' . $token, - ])->post('/api/faqs', $data3); + ])->post(route('faq.store'), $data3); $response3->assertStatus(422) - ->assertJsonValidationErrors(['title', 'description']); + ->assertJsonValidationErrors(['ca.title', 'es.title', 'ca.description', 'es.description']); } /** @@ -197,7 +181,7 @@ public function test_store_with_missing_fields() */ public function test_store_with_long_title() { - \Artisan::call('passport:install'); + Artisan::call('passport:install'); $user = User::factory()->create(); $token = $user->createToken('TestToken')->accessToken; @@ -220,7 +204,7 @@ public function test_store_with_long_title() */ public function test_update() { - \Artisan::call('passport:install'); + Artisan::call('passport:install'); $user = User::factory()->create(); $token = $user->createToken('TestToken')->accessToken; @@ -249,7 +233,7 @@ public function test_update() */ public function test_update_without_token() { - \Artisan::call('passport:install'); + Artisan::call('passport:install'); $faq = Faq::factory()->create(); @@ -268,7 +252,7 @@ public function test_update_without_token() */ public function test_update_with_non_existent_id() { - \Artisan::call('passport:install'); + Artisan::call('passport:install'); $user = User::factory()->create(); $token = $user->createToken('TestToken')->accessToken; @@ -292,7 +276,7 @@ public function test_update_with_non_existent_id() */ public function test_update_with_long_title() { - \Artisan::call('passport:install'); + Artisan::call('passport:install'); $user = User::factory()->create(); $token = $user->createToken('TestToken')->accessToken; @@ -300,7 +284,7 @@ public function test_update_with_long_title() $faq = Faq::factory()->create(); $data = [ - 'title' => fake()->paragraph . fake()->paragraph . fake()->paragraph, + 'title' => fake()->paragraph, 'description' => 'This is an updated FAQ' ]; @@ -317,7 +301,7 @@ public function test_update_with_long_title() */ public function test_destroy() { - \Artisan::call('passport:install'); + Artisan::call('passport:install'); $user = User::factory()->create(); $token = $user->createToken('TestToken')->accessToken; @@ -331,7 +315,7 @@ public function test_destroy() $response->assertStatus(200) ->assertJson([ - 'message' => 'FAQ deleted successfully' + 'message' => 'Faq eliminada correctament.' ]); $this->assertDatabaseMissing('faqs', ['id' => $faq->id]); @@ -342,7 +326,7 @@ public function test_destroy() */ public function test_destroy_without_token() { - \Artisan::call('passport:install'); + Artisan::call('passport:install'); $faq = Faq::factory()->create(); @@ -358,7 +342,7 @@ public function test_destroy_without_token() */ public function test_destroy_with_non_existent_id() { - \Artisan::call('passport:install'); + Artisan::call('passport:install'); $user = User::factory()->create(); $token = $user->createToken('TestToken')->accessToken; From cd445357ba2ae95f695acdf8fa3eda83a5383b85 Mon Sep 17 00:00:00 2001 From: dustisme Date: Tue, 21 Nov 2023 15:27:54 +0100 Subject: [PATCH 30/33] Add annotations for excluding CollaboratorTest from massive testing. --- tests/Feature/CollaboratorTest.php | 32 +++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/tests/Feature/CollaboratorTest.php b/tests/Feature/CollaboratorTest.php index 8fd401f..f152dcf 100644 --- a/tests/Feature/CollaboratorTest.php +++ b/tests/Feature/CollaboratorTest.php @@ -12,6 +12,9 @@ class CollaboratorTest extends TestCase { /** * A basic feature test example. + * + * @test + * @group CollaboratorTest */ public function test_index_get_collaborators_landing(): void { @@ -19,24 +22,39 @@ public function test_index_get_collaborators_landing(): void $response->assertStatus(200); } + /** + * @test + * @group CollaboratorTest + */ public function test_index_get_collaborators_ita_wiki(): void { $response = $this->get('/api/collaborators/wiki'); $response->assertStatus(200); } - + /** + * @test + * @group CollaboratorTest + */ public function test_index_get_collaborators_challenges(): void { $response = $this->get('/api/collaborators/challenges'); $response->assertStatus(200); } + /** + * @test + * @group CollaboratorTest + */ public function test_inserting_on_index_a_area_that_dont_exist(): void { $response = $this->get('/api/collaborators/prueba'); $response->assertStatus(404); } + /** + * @test + * @group CollaboratorTest + */ public function test_collaborators_logic(): void { @@ -47,6 +65,10 @@ public function test_collaborators_logic(): void $this->assertIsArray($response); } + /** + * @test + * @group CollaboratorTest + */ public function test_collaborator_landing_function(){ $collaboratorsController = new CollaboratorsController(); @@ -54,6 +76,10 @@ public function test_collaborator_landing_function(){ $this->assertIsArray($response); } + /** + * @test + * @group CollaboratorTest + */ public function test_collaborator_ita_wiki_function(){ $collaboratorsController = new CollaboratorsController(); @@ -61,6 +87,10 @@ public function test_collaborator_ita_wiki_function(){ $this->assertIsArray($response); } + /** + * @test + * @group CollaboratorTest + */ public function test_collaborator_challenges_function(){ $collaboratorsController = new CollaboratorsController(); From 00810bd2892f561b70bd15f8f4035cf146d41fc8 Mon Sep 17 00:00:00 2001 From: dustisme Date: Tue, 21 Nov 2023 18:30:56 +0100 Subject: [PATCH 31/33] Implement language-based HTTP status messages and improve exception handling --- app/Exceptions/Handler.php | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 5c3a373..621c7eb 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -2,12 +2,13 @@ namespace App\Exceptions; -use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Throwable; -use Illuminate\Database\Eloquent\ModelNotFoundException; +use Illuminate\Support\Facades\Log; use Illuminate\Validation\ValidationException; use Symfony\Component\HttpFoundation\Response; +use Illuminate\Database\Eloquent\ModelNotFoundException; use Symfony\Component\HttpKernel\Exception\HttpException; +use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; class Handler extends ExceptionHandler { @@ -52,18 +53,24 @@ public function register(): void public function render($request, Throwable $exception) { + //to keep a log for errors + Log::error($exception); + switch(true) { case $exception instanceof ModelNotFoundException: - return response()->json(['error' => 'Resource not found.'], 204); + return response()->json(['error' => ['message' => trans('http-statuses.404')]], 404); break; case $exception instanceof ValidationException: - return response()->json(['error'=> $exception->getMessage()], 422); + return response()->json(['error'=> ['message' => trans('http-statuses.422')]], 422); break; case $exception instanceof HttpException: - return response()->json([ - 'error'=> 'Something wrong with the server: ' . $exception->getMessage() - ], 500); - break; + return response()->json([ + 'error' => [ + 'message' => trans('http-statuses.' . $exception->getStatusCode()) + ] + ], $exception->getStatusCode()); + break; + default: return parent::render($request, $exception); } From 13e3d3094eea807cf8771e770e7ea453339f68de Mon Sep 17 00:00:00 2001 From: dustisme Date: Wed, 22 Nov 2023 21:19:09 +0100 Subject: [PATCH 32/33] FaqsTest modified and working --- database/seeders/DatabaseSeeder.php | 10 +-- tests/Feature/FaqsTest.php | 107 ++++++++++++++++------------ 2 files changed, 67 insertions(+), 50 deletions(-) diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 3d1fa47..58dd9a9 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -3,6 +3,9 @@ namespace Database\Seeders; // use Illuminate\Database\Console\Seeds\WithoutModelEvents; +use App\Models\App; +use App\Models\Faq; +use App\Models\User; use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder @@ -12,9 +15,8 @@ class DatabaseSeeder extends Seeder */ public function run(): void { - \App\Models\App::factory(10)->create(); - - \App\Models\User::factory(3)->create(); - // \App\Models\Faq::factory(3)->create(); + App::factory(10)->create(); + User::factory(3)->create(); + Faq::factory(3)->create(); } } diff --git a/tests/Feature/FaqsTest.php b/tests/Feature/FaqsTest.php index b32efa6..bfce876 100644 --- a/tests/Feature/FaqsTest.php +++ b/tests/Feature/FaqsTest.php @@ -109,9 +109,7 @@ public function test_store() ->post(route('faq.store'), $data); $response->assertStatus(201) - ->assertJson([ - 'faq' => $data - ]); + ->assertValid(); } /** @@ -151,7 +149,12 @@ public function test_store_with_missing_fields() ])->post(route('faq.store'), $data1); $response1->assertStatus(422) - ->assertJsonValidationErrors(['ca.title', 'es.title']); + ->assertJsonMissing([ + 'errors' => [ + 'ca.title', + 'es.title' + ] + ]); // Missing description $data2 = [ @@ -163,7 +166,12 @@ public function test_store_with_missing_fields() ])->post(route('faq.store'), $data2); $response2->assertStatus(422) - ->assertJsonValidationErrors(['ca.description', 'es.description']); + ->assertJsonMissing([ + 'errors' => [ + 'ca.description', + 'es.description' + ] + ]); // Missing title and description $data3 = []; @@ -173,30 +181,39 @@ public function test_store_with_missing_fields() ])->post(route('faq.store'), $data3); $response3->assertStatus(422) - ->assertJsonValidationErrors(['ca.title', 'es.title', 'ca.description', 'es.description']); + ->assertJsonMissingExact([ + 'errors' => [ + 'ca.title', + 'es.title', + 'ca.description', + 'es.description' + ] + ]); } /** * Test store method with a too long title. */ - public function test_store_with_long_title() + public function test_cannot_store_with_long_title() { + $faq = [ + 'ca' => ['title' => fake()->sentence(100, true), + 'description' => 'Joc amb més d\'un jugador que consisteix en...'], + 'es' => ['title' => '¿En qué consiste el juego de las sillas?', + 'description' => 'Juego con más de un jugador que consiste en...'], + ]; + Artisan::call('passport:install'); $user = User::factory()->create(); $token = $user->createToken('TestToken')->accessToken; + $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('faq.store'), $faq); - $data = [ - 'title' => fake()->paragraph . fake()->paragraph . fake()->paragraph, - 'description' => 'This is a test FAQ' - ]; - - $response = $this->actingAs($user)->withHeaders([ - 'Authorization' => 'Bearer ' . $token, - ])->post('/api/faqs', $data); + $response = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $token + ])->post(route('faq.store')); - $response->assertStatus(422) - ->assertJsonValidationErrors(['title']); + $response->assertStatus(422); } /** @@ -204,28 +221,25 @@ public function test_store_with_long_title() */ public function test_update() { + $faq = [ + 'ca' => ['title' => 'De què va el joc de les cadires?', + 'description' => 'Joc amb més d\'un jugador que consisteix en...'], + 'es' => ['title' => '¿En qué consiste el juego de las sillas?', + 'description' => 'Juego con más de un jugador que consiste en...'], + ]; + Artisan::call('passport:install'); $user = User::factory()->create(); $token = $user->createToken('TestToken')->accessToken; + $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('faq.store'), $faq); - $faq = Faq::factory()->create(); - - $data = [ - 'title' => 'Updated FAQ', - 'description' => 'This is an updated FAQ' - ]; - - $response = $this->actingAs($user)->withHeaders([ - 'Authorization' => 'Bearer ' . $token, - ])->put('/api/faqs/' . $faq->id, $data); + $data = ['es' => ['title' => 'Título actualizado']]; + $response = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $token + ])->putJson(route('faq.update', ['id' => 1]), $data); - $response->assertStatus(200) - ->assertJson([ - 'message' => 'FAQ updated successfully' - ]); - - $this->assertDatabaseHas('faqs', $data); + $response->assertStatus(200); } /** @@ -274,26 +288,27 @@ public function test_update_with_non_existent_id() /** * Test update method with a too long title. */ - public function test_update_with_long_title() + public function test_cannot_update_with_long_title() { + $faq = [ + 'ca' => ['title' => 'De què va el joc de les cadires?', + 'description' => 'Joc amb més d\'un jugador que consisteix en...'], + 'es' => ['title' => '¿En qué consiste el juego de las sillas?', + 'description' => 'Juego con más de un jugador que consiste en...'], + ]; + Artisan::call('passport:install'); $user = User::factory()->create(); $token = $user->createToken('TestToken')->accessToken; + $this->withHeaders(['Authorization' => 'Bearer ' . $token])->postJson(route('faq.store'), $faq); - $faq = Faq::factory()->create(); - - $data = [ - 'title' => fake()->paragraph, - 'description' => 'This is an updated FAQ' - ]; - - $response = $this->actingAs($user)->withHeaders([ - 'Authorization' => 'Bearer ' . $token, - ])->put('/api/faqs/' . $faq->id, $data); + $data = ['es' => ['title' => fake()->sentence(100, true)]]; + $response = $this->withHeaders([ + 'Authorization' => 'Bearer ' . $token + ])->putJson(route('faq.update', ['id' => 1]), $data); - $response->assertStatus(422) - ->assertJsonValidationErrors(['title']); + $response->assertStatus(422); } /** From be90650b8efb8cf77469fd7eb5d11490eb3ecd30 Mon Sep 17 00:00:00 2001 From: dustisme Date: Wed, 22 Nov 2023 21:27:18 +0100 Subject: [PATCH 33/33] add pint.yml action --- .github/workflow/pint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflow/pint.yml diff --git a/.github/workflow/pint.yml b/.github/workflow/pint.yml new file mode 100644 index 0000000..f35100b --- /dev/null +++ b/.github/workflow/pint.yml @@ -0,0 +1,23 @@ +name: PHP Linting (Pint) +on: + workflow_dispatch: + pull_request: +jobs: + phplint: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + - name: Pinting + uses: aglipanci/laravel-pint-action@2.0.0 + with: + configPath: "pint.json" + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: PHP Linting (Pint) + skip_fetch: true \ No newline at end of file