firstcommit
This commit is contained in:
0
Modules/Consultation/database/factories/.gitkeep
Normal file
0
Modules/Consultation/database/factories/.gitkeep
Normal file
0
Modules/Consultation/database/migrations/.gitkeep
Normal file
0
Modules/Consultation/database/migrations/.gitkeep
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('consultations', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->uuid();
|
||||
$table->string('name');
|
||||
$table->string('email')->nullable();
|
||||
$table->string('contact_no');
|
||||
$table->unsignedTinyInteger('age_group');
|
||||
$table->unsignedTinyInteger('procedure_of_interest');
|
||||
$table->text('subject');
|
||||
$table->text('message');
|
||||
$table->string('is_aggrement');
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('consultations');
|
||||
}
|
||||
};
|
0
Modules/Consultation/database/seeders/.gitkeep
Normal file
0
Modules/Consultation/database/seeders/.gitkeep
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Consultation\database\seeders;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class ConsultationDatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$consultations = [
|
||||
[
|
||||
'uuid' => Str::uuid(),
|
||||
'name' => 'John Doe',
|
||||
'email' => 'john@example.com',
|
||||
'contact_no' => '9846325698',
|
||||
'age_group' => 2,
|
||||
'procedure_of_interest' => 1,
|
||||
'subject' => 'Hair Consultation',
|
||||
'message' => 'I\'m interested in hair...',
|
||||
'is_aggrement' => 11,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
],
|
||||
[
|
||||
'uuid' => Str::uuid(),
|
||||
'name' => 'Hari Sharma',
|
||||
'email' => 'hari@example.com',
|
||||
'contact_no' => '9846325120',
|
||||
'age_group' => 3,
|
||||
'procedure_of_interest' => 2,
|
||||
'subject' => 'Beard Consultation',
|
||||
'message' => 'I\'m interested in beard traspalant...',
|
||||
'is_aggrement' => 11,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
], [
|
||||
'uuid' => Str::uuid(),
|
||||
'name' => 'Gita Shrestha',
|
||||
'email' => 'gita@example.com',
|
||||
'contact_no' => '9813652365',
|
||||
'age_group' => 1,
|
||||
'procedure_of_interest' => 3,
|
||||
'subject' => 'Here is where you can register web routes for your application. These routes are loaded by the
|
||||
RouteServiceProvider within a group which contains the "web" middleware group. Now create something great!',
|
||||
'message' => 'I\'m interested in eyebrow transpalant.',
|
||||
'is_aggrement' => 10,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
],
|
||||
];
|
||||
|
||||
DB::table('consultations')->insert($consultations);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user