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

@@ -0,0 +1,35 @@
<?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('contact_us', function (Blueprint $table) {
$table->id();
$table->uuid();
$table->string('full_name');
$table->string('address')->nullable();
$table->string('email')->nullable();
$table->string('subject')->nullable();
$table->string('message');
$table->string('phone');
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('contact_us');
}
};

View File

@@ -0,0 +1,41 @@
<?php
namespace Modules\ContactUs\database\seeders;
use Illuminate\Support\Str;
use Illuminate\Database\Seeder;
use Modules\ContactUs\app\Models\ContactUs;
class ContactUsDatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$contactUs = [
[
'full_name' => 'radha shyaka',
'address' => 'kathmandu, Nepal',
'email' => 'radhar@example.com',
'phone' => '9801234567',
'subject' => 'Hair transplant',
'message' => 'I wan to transplant hair. What should be process',
],
[
'full_name' => 'shyam shrestha',
'address' => 'lalitpur, Nepal',
'email' => 'shyam@example.com',
'phone' => '9801234566',
'message' => 'May i have detail about doctor for eyebrow tranplant.',
],
];
if (!empty($contactUs)) {
foreach ($contactUs as $data) {
$data['uuid'] = Str::uuid();
ContactUs::create($data);
}
}
}
}