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

1
database/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.sqlite*

View File

@@ -0,0 +1,41 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
protected static ?string $password;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
];
}
/**
* Indicate that the model's email address should be unverified.
*/
public function unverified(): static
{
return $this->state(fn (array $attributes) => [
'email_verified_at' => null,
]);
}
}

View File

@@ -0,0 +1,32 @@
<?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('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
}
};

View File

@@ -0,0 +1,28 @@
<?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('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('password_reset_tokens');
}
};

View File

@@ -0,0 +1,32 @@
<?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('failed_jobs', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('failed_jobs');
}
};

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('personal_access_tokens', function (Blueprint $table) {
$table->id();
$table->morphs('tokenable');
$table->string('name');
$table->string('token', 64)->unique();
$table->text('abilities')->nullable();
$table->timestamp('last_used_at')->nullable();
$table->timestamp('expires_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('personal_access_tokens');
}
};

View File

@@ -0,0 +1,32 @@
<?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('jobs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jobs');
}
};

View File

@@ -0,0 +1,79 @@
<?php
namespace Database\Seeders;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Storage;
use Modules\ContactUs\app\Models\ContactUs;
use Modules\TeamMember\app\Models\TeamMember;
use Modules\Subscription\app\Models\Subscription;
use Modules\FAQ\database\seeders\FAQDatabaseSeeder;
use Modules\Blog\database\seeders\BlogDatabaseSeeder;
use Modules\Page\database\seeders\PageDatabaseSeeder;
use Modules\Post\database\seeders\PostDatabaseSeeder;
use Modules\Banner\database\seeders\BannerDatabaseSeeder;
use Modules\Client\database\seeders\ClientDatabaseSeeder;
use Modules\AboutUs\database\seeders\AboutUsDatabaseSeeder;
use Modules\Gallery\database\seeders\GalleryDatabaseSeeder;
use Modules\Package\database\seeders\PackageDatabaseSeeder;
use Modules\Service\database\seeders\ServiceDatabaseSeeder;
use Modules\Setting\database\seeders\SettingDatabaseSeeder;
use Modules\Activity\database\seeders\ActivityDatabaseSeeder;
use Modules\AdminUser\database\seeders\AdminUserDatabaseSeeder;
use Modules\ContactUs\database\seeders\ContactUsDatabaseSeeder;
use Modules\TeamMember\database\seeders\TeamMemberDatabaseSeeder;
use Modules\Appointment\database\seeders\AppointmentDatabaseSeeder;
use Modules\CountryList\database\seeders\CountryListDatabaseSeeder;
use Modules\Destination\database\seeders\DestinationDatabaseSeeder;
use Modules\Testimonial\database\seeders\TestimonialDatabaseSeeder;
use Modules\Consultation\database\seeders\ConsultationDatabaseSeeder;
use Modules\Subscription\database\seeders\SubscriptionDatabaseSeeder;
use Modules\Transformation\database\seeders\TransformationDatabaseSeeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
//-- Empty Directory
Storage::disk('public')->deleteDirectory('/uploads/');
$this->call(AdminUserDatabaseSeeder::class);
$this->call(PageDatabaseSeeder::class);
$this->call(BannerDatabaseSeeder::class);
$this->call(BlogDatabaseSeeder::class);
$this->call(CountryListDatabaseSeeder::class);
$this->call(ActivityDatabaseSeeder::class);
$this->call(DestinationDatabaseSeeder::class);
$this->call(PackageDatabaseSeeder::class);
$this->call(TestimonialDatabaseSeeder::class);
$this->call(GalleryDatabaseSeeder::class);
$this->call(ServiceDatabaseSeeder::class);
$this->call(SettingDatabaseSeeder::class);
$this->call(TeamMemberDatabaseSeeder::class);
$this->call(AboutUsDatabaseSeeder::class);
$this->call(ClientDatabaseSeeder::class);
$this->call(FAQDatabaseSeeder::class);
$this->call(PostDatabaseSeeder::class);
$this->call(TransformationDatabaseSeeder::class);
/*-------------------------------------------------------------------------
# Development Seeder
-------------------------------------------------------------------------*/
if (env('AROGIN_APP_ENV') == 'development' || env('AROGIN_APP_ENV') == 'test') {
$this->createDevEnvironment();
}
}
private function createDevEnvironment()
{
$this->call(ContactUsDatabaseSeeder::class);
$this->call(SubscriptionDatabaseSeeder::class);
$this->call(AppointmentDatabaseSeeder::class);
$this->call(ConsultationDatabaseSeeder::class);
}
}