This commit is contained in:
tanch0
2024-06-18 11:31:51 +05:45
parent fcbaa0f679
commit 613dfd1834
116 changed files with 4829 additions and 1558 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('videos', function (Blueprint $table) {
$table->id('video_id');
$table->string('title', 255)->nullable();
$table->string('video_url', 255)->nullable();
$table->string('image', 255)->nullable();
$table->string('alias', 255)->nullable();
$table->integer('status')->default(1);
$table->integer('display_order')->default(1);
$table->integer('createdBy')->nullable();
$table->integer('updatedBy')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('videos');
}
};

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('horoscopes', function (Blueprint $table) {
$table->id('horoscope_id');
$table->string('title', 255)->nullable();
$table->string('title_nepali', 255)->charset('utf8mb4')->collate('utf8mb4_unicode_ci')->nullable();
$table->string('alias', 255)->nullable();
$table->string('description', 255)->nullable();
$table->integer('status')->default(1);
$table->integer('display_order')->default(1);
$table->integer('createdBy')->nullable();
$table->integer('updatedBy')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('horoscopes');
}
};

View File

@ -0,0 +1,29 @@
<?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::table('horoscopes', function (Blueprint $table) {
$table->string('image')->nullable()->after('alias');
$table->string('thumb')->nullable()->after('image');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('horoscopes', function (Blueprint $table) {
$table->dropColumn(['image', 'thumb']);
});
}
};

View File

@ -0,0 +1,41 @@
<?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('articles', function (Blueprint $table) {
$table->id('article_id');
$table->integer('parent_article')->default(0);
$table->string('title', 250)->nullable();
$table->text('subtitle')->nullable();
$table->string('alias', 250)->nullable();
$table->text('text')->nullable();
$table->string('cover_photo', 500)->nullable();
$table->integer('display_order')->default(1);
$table->integer('status')->default(1);
$table->text('seo_keywords')->nullable();
$table->text('seo_title')->nullable();
$table->text('seo_descriptions')->nullable();
$table->text('og_tags')->nullable();
$table->integer('createdby')->nullable();
$table->integer('updatedby')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('articles');
}
};

View File

@ -0,0 +1,36 @@
<?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('teams', function (Blueprint $table) {
$table->id('team_id');
$table->string('title', 255)->nullable();
$table->string('alias', 255)->nullable();
$table->string('photo', 255)->nullable();
$table->string('designation', 255)->nullable();
$table->text('description')->nullable();
$table->integer('display_order')->nullable();
$table->integer('status')->nullable();
$table->integer('createdby')->nullable();
$table->integer('updatedby')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('teams');
}
};

View File

@ -0,0 +1,29 @@
<?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::table('settings', function (Blueprint $table) {
$table->string('recaptcha_secret_key')->nullable()->after('updatedby');
$table->string('recaptcha_site_key')->nullable()->after('recaptcha_secret_key');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('settings', function (Blueprint $table) {
$table->dropColumn(['recaptcha_secret_key', 'recaptcha_site_key']);
});
}
};

View File

@ -16,5 +16,7 @@ class DatabaseSeeder extends Seeder
$this->call(ProvinceSeeder::class);
$this->call(NewsTypeSeeder::class);
$this->call(NewsCategorySeeder::class);
$this->call(HoroscopeSeeder::class);
$this->call(WebsiteSettingSeeder::class);
}
}

View File

@ -0,0 +1,211 @@
<?php
namespace Database\Seeders;
use App\Models\Horoscopes;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class HoroscopeSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
Horoscopes::create([
'horoscope_id' => 1,
'title'=> 'Aquarius',
'title_nepali'=> 'कुम्भ राशि',
'alias' => 'aquarius',
'image'=> '',
'thumb'=> '',
'description' => '',
'status' => 1,
'display_order'=>1,
'createdBy' => 1,
'updatedBy' =>1,
'created_at' => now(),
'updated_at' => now(),
]);
Horoscopes::create([
'horoscope_id' => 2,
'title'=> 'Aries',
'title_nepali'=> 'मेष राशि',
'alias' => 'aries',
'image'=> '',
'thumb'=> '',
'description' => '',
'status' => 1,
'display_order'=>2,
'createdBy' => 1,
'updatedBy' =>1,
'created_at' => now(),
'updated_at' => now(),
]);
Horoscopes::create([
'horoscope_id' => 3,
'title'=> 'Cancer',
'title_nepali'=> 'कर्कट राशि',
'alias' => 'cancer',
'image'=> '',
'thumb'=> '',
'description' => '',
'status' => 1,
'display_order'=>3,
'createdBy' => 1,
'updatedBy' =>1,
'created_at' => now(),
'updated_at' => now(),
]);
Horoscopes::create([
'horoscope_id' => 4,
'title'=> 'Capricon',
'title_nepali'=> 'मकर राशि',
'alias' => 'capricon',
'image'=> '',
'thumb'=> '',
'description' => '',
'status' => 1,
'display_order'=>4,
'createdBy' => 1,
'updatedBy' =>1,
'created_at' => now(),
'updated_at' => now(),
]);
Horoscopes::create([
'horoscope_id' => 5,
'title'=> 'Gemini',
'title_nepali'=> 'मिथुन राशि',
'alias' => 'gemini',
'image'=> '',
'thumb'=> '',
'description' => '',
'status' => 1,
'display_order'=>5,
'createdBy' => 1,
'updatedBy' =>1,
'created_at' => now(),
'updated_at' => now(),
]);
Horoscopes::create([
'horoscope_id' => 6,
'title'=> 'Leo',
'title_nepali'=> 'सिंह राशि',
'alias' => 'leo',
'image'=> '',
'thumb'=> '',
'description' => '',
'status' => 1,
'display_order'=>6,
'createdBy' => 1,
'updatedBy' =>1,
'created_at' => now(),
'updated_at' => now(),
]);
Horoscopes::create([
'horoscope_id' => 7,
'title'=> 'Libra',
'title_nepali'=> 'तुला राशि',
'alias' => 'libra',
'image'=> '',
'thumb'=> '',
'description' => '',
'status' => 1,
'display_order'=>7,
'createdBy' => 1,
'updatedBy' =>1,
'created_at' => now(),
'updated_at' => now(),
]);
Horoscopes::create([
'horoscope_id' => 8,
'title'=> 'Pisces',
'title_nepali'=> 'मीन राशि',
'alias' => 'pisces',
'image'=> '',
'thumb'=> '',
'description' => '',
'status' => 1,
'display_order'=>8,
'createdBy' => 1,
'updatedBy' =>1,
'created_at' => now(),
'updated_at' => now(),
]);
Horoscopes::create([
'horoscope_id' => 9,
'title'=> 'Sagittarius',
'title_nepali'=> 'धनु राशि',
'alias' => 'sagittarius',
'image'=> '',
'thumb'=> '',
'description' => '',
'status' => 1,
'display_order'=>9,
'createdBy' => 1,
'updatedBy' =>1,
'created_at' => now(),
'updated_at' => now(),
]);
Horoscopes::create([
'horoscope_id' => 10,
'title'=> 'Scorpio',
'title_nepali'=> 'वृश्चिक राशि',
'alias' => 'scorpio',
'image'=> '',
'thumb'=> '',
'description' => '',
'status' => 1,
'display_order'=>10,
'createdBy' => 1,
'updatedBy' =>1,
'created_at' => now(),
'updated_at' => now(),
]);
Horoscopes::create([
'horoscope_id' => 11,
'title'=> 'Taurus',
'title_nepali'=> 'वृष राशि',
'alias' => 'taurus',
'image'=> '',
'thumb'=> '',
'description' => '',
'status' => 1,
'display_order'=>11,
'createdBy' => 1,
'updatedBy' =>1,
'created_at' => now(),
'updated_at' => now(),
]);
Horoscopes::create([
'horoscope_id' => 12,
'title'=> 'Virgo',
'title_nepali'=> 'कन्या राशि',
'alias' => 'virgo',
'image'=> '',
'thumb'=> '',
'description' => '',
'status' => 1,
'display_order'=>12,
'createdBy' => 1,
'updatedBy' =>1,
'created_at' => now(),
'updated_at' => now(),
]);
}
}

View File

@ -0,0 +1,44 @@
<?php
namespace Database\Seeders;
use App\Models\Settings;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class WebsiteSettingSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
Settings::create([
'title' => 'Hulaki_Khabar',
'description' => 'हुलाकी खबर समाजमा सकारात्मक प्रभाव गर्ने लक्ष्यमा समाजिक न्याय र पारदर्शितामा प्रोत्साहित गर्दछ। हुलाकी खबरले नेपाली बोल्ने समुदायलाई समाचारमा संचित, शिक्षित, र जोडित गर्दै महत्वपूर्ण भूमिका खेल्दछ, राष्ट्रिय र अन्तर्राष्ट्रिय समाचारमा सक्रिय योगदान गर्दै डिजिटल पत्रकारितामा एक प्रमुख भूमिका खेल्दछ।',
'url1' => 'www.hulakikhabar.com',
'url2' => '',
'email' => 'abc@example.com',
'location' => 'काठमाण्डौ , नेपाल',
'phone' => '९८००००००००',
'secondary_phone' => '०१--',
'google_map' => '',
'fb' => 'https://www.facebook.com',
'insta' => 'https://www.facebook.com/',
'twitter' => 'https://www.facebook.com/',
'tiktok' => 'https://www.facebook.com/',
'youtube' => 'https://www.facebook.com/',
'working_days' => '',
'working_hours' => '',
'leave_days' => '',
'primary_logo' => '',
'secondary_logo' => '',
'thumb' => '',
'icon' => '',
'display_order' => 1,
'status' => 1,
]);
}
}