use App\Models\Phrase;
use App\Helpers\Helper;
use App\Helpers\DbHelper;
+use App\Helpers\GermanGrammar;
use App\Models\SProperty;
use App\Helpers\Pagination;
use App\Helpers\ViewHelper;
{
if ($isCreate){
$rc = [
- 'imperfect1s' => 'required',
- 'participle' => 'required',
+ 'verb' => 'required',
'separablepart' => '',
'transitive' => 'required',
'usage' => 'required',
$rc = back()->withErrors($validator)->withInput();
} else {
$validated = $validator->validated();
- $base = $fields['verb'];
- $base = substr($base, 0, strlen($base) - 2);
- $tail1 = str_ends_with($base, 's') ? 't' : 'st';
- $tail2 = 'en';
- $tail0 = 'e';
- $validated ['presence1s'] = $base . $tail0;
- $validated ['presence2s'] = $base . $tail1;
- $validated ['presence3s'] = $base . $tail1;
- $validated ['presence1p'] = $base . $tail2;
- $validated ['presence2p'] = $base . $tail1;
- $validated ['presence3p'] = $base . $tail2;
- $base = $validated['imperfect1s'];
- $base = substr($base, 0, strlen($base) - 1);
- $validated ['imperfect2s'] = $base . $tail1;
- $validated ['imperfect3s'] = $base . $tail1;
- $validated ['imperfect1p'] = $base . $tail2;
- $validated ['imperfect2p'] = $base . $tail1;
- $validated ['imperfect3p'] = $base . $tail2;
+ $verb = $fields['verb'];
+ $validated ['participle'] = GermanGrammar::verbParticipe($verb);
+ $validated ['presence1s'] = GermanGrammar::verbPresent($verb, 1, true);
+ $validated ['presence2s'] = GermanGrammar::verbPresent($verb, 2, true);
+ $validated ['presence3s'] = GermanGrammar::verbPresent($verb, 3, true);
+ $validated ['presence1p'] = GermanGrammar::verbPresent($verb, 1, false);
+ $validated ['presence2p'] = GermanGrammar::verbPresent($verb, 2, false);
+ $validated ['presence3p'] = GermanGrammar::verbPresent($verb, 3, false);
+ $validated ['imperfect1s'] = GermanGrammar::verbImperfect($verb, 1, true);
+ $validated ['imperfect2s'] = GermanGrammar::verbImperfect($verb, 2, true);
+ $validated ['imperfect3s'] = GermanGrammar::verbImperfect($verb, 3, true);
+ $validated ['imperfect1p'] = GermanGrammar::verbImperfect($verb, 1, false);
+ $validated ['imperfect2p'] = GermanGrammar::verbImperfect($verb, 2, false);
+ $validated ['imperfect3p'] = GermanGrammar::verbImperfect($verb, 3, false);
$word = Word::create([
'word' => $fields['verb'],
'wordtype_scope' => 2002,
},
{
"name": "symfony/console",
- "version": "v7.0.4",
+ "version": "v7.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "6b099f3306f7c9c2d2786ed736d0026b2903205f"
+ "reference": "fde915cd8e7eb99b3d531d3d5c09531429c3f9e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/6b099f3306f7c9c2d2786ed736d0026b2903205f",
- "reference": "6b099f3306f7c9c2d2786ed736d0026b2903205f",
+ "url": "https://api.github.com/repos/symfony/console/zipball/fde915cd8e7eb99b3d531d3d5c09531429c3f9e5",
+ "reference": "fde915cd8e7eb99b3d531d3d5c09531429c3f9e5",
"shasum": ""
},
"require": {
"terminal"
],
"support": {
- "source": "https://github.com/symfony/console/tree/v7.0.4"
+ "source": "https://github.com/symfony/console/tree/v7.0.6"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2024-02-22T20:27:20+00:00"
+ "time": "2024-04-01T11:04:53+00:00"
},
{
"name": "symfony/css-selector",
},
{
"name": "symfony/error-handler",
- "version": "v7.0.4",
+ "version": "v7.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
- "reference": "677b24759decff69e65b1e9d1471d90f95ced880"
+ "reference": "46a4cc138f799886d4bd70477c55c699d3e9dfc8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/error-handler/zipball/677b24759decff69e65b1e9d1471d90f95ced880",
- "reference": "677b24759decff69e65b1e9d1471d90f95ced880",
+ "url": "https://api.github.com/repos/symfony/error-handler/zipball/46a4cc138f799886d4bd70477c55c699d3e9dfc8",
+ "reference": "46a4cc138f799886d4bd70477c55c699d3e9dfc8",
"shasum": ""
},
"require": {
"description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/error-handler/tree/v7.0.4"
+ "source": "https://github.com/symfony/error-handler/tree/v7.0.6"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2024-02-22T20:27:20+00:00"
+ "time": "2024-03-19T11:57:22+00:00"
},
{
"name": "symfony/event-dispatcher",
},
{
"name": "symfony/event-dispatcher-contracts",
- "version": "v3.4.0",
+ "version": "v3.4.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
- "reference": "a76aed96a42d2b521153fb382d418e30d18b59df"
+ "reference": "4e64b49bf370ade88e567de29465762e316e4224"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df",
- "reference": "a76aed96a42d2b521153fb382d418e30d18b59df",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/4e64b49bf370ade88e567de29465762e316e4224",
+ "reference": "4e64b49bf370ade88e567de29465762e316e4224",
"shasum": ""
},
"require": {
"standards"
],
"support": {
- "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.0"
+ "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.2"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2023-05-23T14:45:45+00:00"
+ "time": "2024-01-23T14:51:35+00:00"
},
{
"name": "symfony/finder",
},
{
"name": "symfony/http-foundation",
- "version": "v7.0.4",
+ "version": "v7.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "439fdfdd344943254b1ef6278613e79040548045"
+ "reference": "8789625dcf36e5fbf753014678a1e090f1bc759c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/439fdfdd344943254b1ef6278613e79040548045",
- "reference": "439fdfdd344943254b1ef6278613e79040548045",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/8789625dcf36e5fbf753014678a1e090f1bc759c",
+ "reference": "8789625dcf36e5fbf753014678a1e090f1bc759c",
"shasum": ""
},
"require": {
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/http-foundation/tree/v7.0.4"
+ "source": "https://github.com/symfony/http-foundation/tree/v7.0.6"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2024-02-08T19:22:56+00:00"
+ "time": "2024-03-19T11:46:48+00:00"
},
{
"name": "symfony/http-kernel",
- "version": "v7.0.5",
+ "version": "v7.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "37c24ca28f65e3121a68f3dd4daeb36fb1fa2a72"
+ "reference": "34c872391046d59af804af62d4573b829cfe4824"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/37c24ca28f65e3121a68f3dd4daeb36fb1fa2a72",
- "reference": "37c24ca28f65e3121a68f3dd4daeb36fb1fa2a72",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/34c872391046d59af804af62d4573b829cfe4824",
+ "reference": "34c872391046d59af804af62d4573b829cfe4824",
"shasum": ""
},
"require": {
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/http-kernel/tree/v7.0.5"
+ "source": "https://github.com/symfony/http-kernel/tree/v7.0.6"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2024-03-04T21:05:24+00:00"
+ "time": "2024-04-03T06:12:25+00:00"
},
{
"name": "symfony/mailer",
- "version": "v7.0.4",
+ "version": "v7.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/mailer.git",
- "reference": "72e16d87bf50a3ce195b9470c06bb9d7b816ea85"
+ "reference": "eb0c3187c7ddfde12d8aa0e1fa5fb29e730a41e0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/mailer/zipball/72e16d87bf50a3ce195b9470c06bb9d7b816ea85",
- "reference": "72e16d87bf50a3ce195b9470c06bb9d7b816ea85",
+ "url": "https://api.github.com/repos/symfony/mailer/zipball/eb0c3187c7ddfde12d8aa0e1fa5fb29e730a41e0",
+ "reference": "eb0c3187c7ddfde12d8aa0e1fa5fb29e730a41e0",
"shasum": ""
},
"require": {
"description": "Helps sending emails",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/mailer/tree/v7.0.4"
+ "source": "https://github.com/symfony/mailer/tree/v7.0.6"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2024-02-03T21:34:19+00:00"
+ "time": "2024-03-28T09:20:36+00:00"
},
{
"name": "symfony/mime",
- "version": "v7.0.3",
+ "version": "v7.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/mime.git",
- "reference": "c1ffe24ba6fdc3e3f0f3fcb93519103b326a3716"
+ "reference": "99362408c9abdf8c7cadcf0529b6fc8b16f5ace2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/mime/zipball/c1ffe24ba6fdc3e3f0f3fcb93519103b326a3716",
- "reference": "c1ffe24ba6fdc3e3f0f3fcb93519103b326a3716",
+ "url": "https://api.github.com/repos/symfony/mime/zipball/99362408c9abdf8c7cadcf0529b6fc8b16f5ace2",
+ "reference": "99362408c9abdf8c7cadcf0529b6fc8b16f5ace2",
"shasum": ""
},
"require": {
"league/html-to-markdown": "^5.0",
"phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0",
"symfony/dependency-injection": "^6.4|^7.0",
+ "symfony/process": "^6.4|^7.0",
"symfony/property-access": "^6.4|^7.0",
"symfony/property-info": "^6.4|^7.0",
"symfony/serializer": "^6.4|^7.0"
"mime-type"
],
"support": {
- "source": "https://github.com/symfony/mime/tree/v7.0.3"
+ "source": "https://github.com/symfony/mime/tree/v7.0.6"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2024-01-30T08:34:29+00:00"
+ "time": "2024-03-21T19:37:36+00:00"
},
{
"name": "symfony/polyfill-ctype",
},
{
"name": "symfony/routing",
- "version": "v7.0.5",
+ "version": "v7.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "ba6bf07d43289c6a4b4591ddb75bc3bc5f069c19"
+ "reference": "cded64e5bbf9f31786f1055fcc76718fdd77519c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/ba6bf07d43289c6a4b4591ddb75bc3bc5f069c19",
- "reference": "ba6bf07d43289c6a4b4591ddb75bc3bc5f069c19",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/cded64e5bbf9f31786f1055fcc76718fdd77519c",
+ "reference": "cded64e5bbf9f31786f1055fcc76718fdd77519c",
"shasum": ""
},
"require": {
"url"
],
"support": {
- "source": "https://github.com/symfony/routing/tree/v7.0.5"
+ "source": "https://github.com/symfony/routing/tree/v7.0.6"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2024-02-27T12:34:35+00:00"
+ "time": "2024-03-28T21:02:11+00:00"
},
{
"name": "symfony/service-contracts",
- "version": "v3.4.1",
+ "version": "v3.4.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
- "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0"
+ "reference": "11bbf19a0fb7b36345861e85c5768844c552906e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/fe07cbc8d837f60caf7018068e350cc5163681a0",
- "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/11bbf19a0fb7b36345861e85c5768844c552906e",
+ "reference": "11bbf19a0fb7b36345861e85c5768844c552906e",
"shasum": ""
},
"require": {
"standards"
],
"support": {
- "source": "https://github.com/symfony/service-contracts/tree/v3.4.1"
+ "source": "https://github.com/symfony/service-contracts/tree/v3.4.2"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2023-12-26T14:02:43+00:00"
+ "time": "2023-12-19T21:51:00+00:00"
},
{
"name": "symfony/string",
},
{
"name": "symfony/translation-contracts",
- "version": "v3.4.1",
+ "version": "v3.4.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation-contracts.git",
- "reference": "06450585bf65e978026bda220cdebca3f867fde7"
+ "reference": "43810bdb2ddb5400e5c5e778e27b210a0ca83b6b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/06450585bf65e978026bda220cdebca3f867fde7",
- "reference": "06450585bf65e978026bda220cdebca3f867fde7",
+ "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/43810bdb2ddb5400e5c5e778e27b210a0ca83b6b",
+ "reference": "43810bdb2ddb5400e5c5e778e27b210a0ca83b6b",
"shasum": ""
},
"require": {
"standards"
],
"support": {
- "source": "https://github.com/symfony/translation-contracts/tree/v3.4.1"
+ "source": "https://github.com/symfony/translation-contracts/tree/v3.4.2"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2023-12-26T14:02:43+00:00"
+ "time": "2024-01-23T14:51:35+00:00"
},
{
"name": "symfony/uid",
},
{
"name": "symfony/var-dumper",
- "version": "v7.0.4",
+ "version": "v7.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "e03ad7c1535e623edbb94c22cc42353e488c6670"
+ "reference": "66d13dc207d5dab6b4f4c2b5460efe1bea29dbfb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e03ad7c1535e623edbb94c22cc42353e488c6670",
- "reference": "e03ad7c1535e623edbb94c22cc42353e488c6670",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/66d13dc207d5dab6b4f4c2b5460efe1bea29dbfb",
+ "reference": "66d13dc207d5dab6b4f4c2b5460efe1bea29dbfb",
"shasum": ""
},
"require": {
"dump"
],
"support": {
- "source": "https://github.com/symfony/var-dumper/tree/v7.0.4"
+ "source": "https://github.com/symfony/var-dumper/tree/v7.0.6"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2024-02-15T11:33:06+00:00"
+ "time": "2024-03-19T11:57:22+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",