first commit
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Location;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class LocationSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$locations = [
|
||||
[
|
||||
'name' => 'Downtown',
|
||||
'slug' => 'downtown',
|
||||
'description' => 'The bustling city center with plenty of opportunities for crime.',
|
||||
'travel_cost' => 0,
|
||||
'requires_level' => null,
|
||||
'faction_control' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'Industrial District',
|
||||
'slug' => 'industrial-district',
|
||||
'description' => 'Factories and warehouses provide cover for illegal activities.',
|
||||
'travel_cost' => 500,
|
||||
'requires_level' => 5,
|
||||
'faction_control' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'Waterfront',
|
||||
'slug' => 'waterfront',
|
||||
'description' => 'The docks are perfect for smuggling operations.',
|
||||
'travel_cost' => 1000,
|
||||
'requires_level' => 10,
|
||||
'faction_control' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'Uptown',
|
||||
'slug' => 'uptown',
|
||||
'description' => 'The wealthy district. High rewards but high risks.',
|
||||
'travel_cost' => 1500,
|
||||
'requires_level' => 15,
|
||||
'faction_control' => null,
|
||||
],
|
||||
[
|
||||
'name' => 'Suburbs',
|
||||
'slug' => 'suburbs',
|
||||
'description' => 'Quiet residential area. Less police presence but fewer opportunities.',
|
||||
'travel_cost' => 300,
|
||||
'requires_level' => 3,
|
||||
'faction_control' => null,
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($locations as $location) {
|
||||
Location::updateOrCreate(
|
||||
['slug' => $location['slug']],
|
||||
$location
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user