From cd9ffc012ef2d7b2e5aced801154d63eb530585a Mon Sep 17 00:00:00 2001 From: Beluzsar Peter Date: Thu, 13 Aug 2026 22:30:42 +0200 Subject: [PATCH] create suggestion model, fix unfillable language --- app/Models/Tla.php | 2 +- app/Models/TlaSuggestion.php | 12 +++++++ ...8_13_114058_create_tlasuggestion_table.php | 31 +++++++++++++++++++ resources/css/app.css | 4 +++ resources/js/App.vue | 1 + resources/js/pages/HomeView.vue | 2 +- resources/js/pages/SuggestionView.vue | 17 ++++++++++ 7 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 app/Models/TlaSuggestion.php create mode 100644 database/migrations/2026_08_13_114058_create_tlasuggestion_table.php diff --git a/app/Models/Tla.php b/app/Models/Tla.php index a58c37d..1e6ab2b 100644 --- a/app/Models/Tla.php +++ b/app/Models/Tla.php @@ -11,7 +11,7 @@ class Tla extends Model use HasFactory; - protected $fillable = ['acronym', 'hint', 'used', 'context']; + protected $fillable = ['acronym', 'hint', 'language', 'used', 'context']; public static function GetCurrentTla( string $language ) : Tla { $tla = Tla::where('used', date("Y-m-d")) diff --git a/app/Models/TlaSuggestion.php b/app/Models/TlaSuggestion.php new file mode 100644 index 0000000..f455d2d --- /dev/null +++ b/app/Models/TlaSuggestion.php @@ -0,0 +1,12 @@ +id(); + $table->string('acronym'); + $table->string('hint')->nullable(); + $table->enum('language', ['hu', 'en']); + $table->longText('context')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('tla_suggestion'); + } +}; diff --git a/resources/css/app.css b/resources/css/app.css index 0ac0f3c..02e77c1 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -9,6 +9,10 @@ 'Segoe UI Symbol', 'Noto Color Emoji'; } +:root { + --ui-primary: rgb(255, 200, 0); +} + .main { text-align: center; } diff --git a/resources/js/App.vue b/resources/js/App.vue index bdac5e0..3bdb980 100644 --- a/resources/js/App.vue +++ b/resources/js/App.vue @@ -29,6 +29,7 @@ import HowToPlay from "./components/HowToPlay.vue"; diff --git a/resources/js/pages/HomeView.vue b/resources/js/pages/HomeView.vue index 09ac4e1..7d8fcff 100644 --- a/resources/js/pages/HomeView.vue +++ b/resources/js/pages/HomeView.vue @@ -96,7 +96,7 @@