diff --git a/app/Models/Tour.php b/app/Models/Tour.php
index 6f37459..9dd3952 100644
--- a/app/Models/Tour.php
+++ b/app/Models/Tour.php
@@ -15,9 +15,15 @@ class Tour extends Model
return $this->belongsToMany(Country::class, 'tour_countries', 'tour_id', 'country_id');
}
+ public function tour_days()
+ {
+ return $this->hasMany(TourDay::class);
+ }
+
public static function featuredTours(){
return Tour::whereHas('countries.continent')
->with('countries.continent')
+ ->with('tour_days')
->inRandomOrder()
->limit(4)
->get();
diff --git a/app/Models/TourDay.php b/app/Models/TourDay.php
new file mode 100644
index 0000000..54e864b
--- /dev/null
+++ b/app/Models/TourDay.php
@@ -0,0 +1,26 @@
+belongsTo(Tour::class);
+ }
+}
diff --git a/database/factories/TourDayFactory.php b/database/factories/TourDayFactory.php
new file mode 100644
index 0000000..7180f58
--- /dev/null
+++ b/database/factories/TourDayFactory.php
@@ -0,0 +1,22 @@
+ Tour::whereInternalName('hebei_harmony')->first()->id,
+ 'description' => $this->faker->sentence(),
+ 'content' => $this->faker->paragraphs(3, true),
+ 'image' => $this->faker->imageUrl(800, 600, 'travel', true, 'Tour Day'),
+ ];
+ }
+}
diff --git a/database/migrations/2025_09_18_051804_create_tour_days_table.php b/database/migrations/2025_09_18_051804_create_tour_days_table.php
new file mode 100644
index 0000000..7aaa69d
--- /dev/null
+++ b/database/migrations/2025_09_18_051804_create_tour_days_table.php
@@ -0,0 +1,26 @@
+id();
+ $table->foreignId('tour_id')
+ ->constrained('tours')
+ ->onDelete('cascade');
+ $table->string('description')->nullable();
+ $table->text('content')->nullable();
+ $table->string('image')->nullable();
+ $table->timestamps();
+ });
+ }
+
+ public function down(): void
+ {
+ Schema::dropIfExists('tour_days');
+ }
+};
diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php
index 99b7514..37fa0df 100644
--- a/database/seeders/DatabaseSeeder.php
+++ b/database/seeders/DatabaseSeeder.php
@@ -2,6 +2,7 @@
namespace Database\Seeders;
+use App\Models\TourDay;
use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
@@ -13,7 +14,7 @@ class DatabaseSeeder extends Seeder
*/
public function run(): void
{
- // User::factory(10)->create();
+ User::factory(10)->create();
$this
->call(ContinentSeeder::class)
->call(CountrySeeder::class)
@@ -21,6 +22,8 @@ class DatabaseSeeder extends Seeder
->call(TourCountrySeeder::class)
;
+ TourDay::factory()->count(5)->create();
+
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
diff --git a/resources/js/components/dredgy/ButtonLink.vue b/resources/js/components/dredgy/ButtonLink.vue
new file mode 100644
index 0000000..08740a0
--- /dev/null
+++ b/resources/js/components/dredgy/ButtonLink.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
{{tour.short_description}}
Dr Edgy was founded by two close friends who met travelling in North Korea. Both of us love adventure travel with a bit of luxury. One of us is even an actual doctor.
You are in safe hands.