mirror of
https://github.com/pacnpal/thrillwiki_laravel.git
synced 2025-12-20 05:51:09 -05:00
Add photo management features, update database configuration, and enhance park model seeding
This commit is contained in:
@@ -19,5 +19,10 @@ class DatabaseSeeder extends Seeder
|
||||
'name' => 'Test User',
|
||||
'email' => 'test@example.com',
|
||||
]);
|
||||
|
||||
// Seed parks
|
||||
$this->call([
|
||||
ParkSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
40
database/seeders/ParkSeeder.php
Normal file
40
database/seeders/ParkSeeder.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Park;
|
||||
use App\Enums\ParkStatus;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ParkSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// Create a test park
|
||||
Park::create([
|
||||
'name' => 'Test Park',
|
||||
'slug' => 'test-park',
|
||||
'description' => 'This is a test park for demonstrating the photo management system.',
|
||||
'status' => ParkStatus::OPERATING,
|
||||
'opening_date' => '2020-01-01',
|
||||
'size_acres' => 100.5,
|
||||
'operating_season' => 'Year-round',
|
||||
'website' => 'https://example.com',
|
||||
]);
|
||||
|
||||
// Create a second park
|
||||
Park::create([
|
||||
'name' => 'Adventure World',
|
||||
'slug' => 'adventure-world',
|
||||
'description' => 'A thrilling adventure park with exciting rides and attractions.',
|
||||
'status' => ParkStatus::OPERATING,
|
||||
'opening_date' => '2015-05-15',
|
||||
'size_acres' => 250.75,
|
||||
'operating_season' => 'March to October',
|
||||
'website' => 'https://adventureworld-example.com',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user