firstcommit

This commit is contained in:
2025-08-17 16:23:14 +05:45
commit 76bf4c0a18
2648 changed files with 362795 additions and 0 deletions

View File

View File

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('faqs', function (Blueprint $table) {
$table->id();
$table->uuid();
$table->string('question');
$table->string('answer', 1000);
$table->integer('ordering');
$table->string('status')->default('active');
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('faqs');
}
};

View File

View File

@@ -0,0 +1,42 @@
<?php
namespace Modules\FAQ\database\seeders;
use Illuminate\Support\Str;
use Illuminate\Database\Seeder;
use Modules\FAQ\app\Models\Faq;
class FAQDatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$faqs = [
[
'uuid' => Str::uuid(),
'question' => 'Do I need to complete the Philippines eTravel declaration?',
'answer' => 'The Philippines eTravel system is mandatory for all passengers traveling to and from the Philippines. You cannot enter or leave the country without an approved declaration.',
'ordering' => 20,
'status' => 'active'
],
[
'uuid' => Str::uuid(),
'question' => 'Can I use my time machine to travel to the past and meet dinosaurs?',
'answer' => "While the idea of meeting dinosaurs is exciting, unfortunately, time travel technology doesn't exist yet. It's purely a concept in science fiction. However, you can always learn about dinosaurs through books, museums, and documentaries to satisfy your curiosity about these ancient creatures!",
'ordering' => 2,
'status' => 'active'
]
];
foreach ($faqs as $faq) {
$faq = Faq::create([
'uuid' => Str::uuid(),
'question' => $faq['question'],
'answer' => $faq['answer'],
'ordering' => $faq['ordering'],
'status' => $faq['status'],
]);
}
}
}