mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
guarded instead of fillable
This commit is contained in:
@@ -26,6 +26,7 @@ class CityFactory extends Factory
|
||||
return [
|
||||
'country_id' => Country::factory(),
|
||||
'name' => $this->faker->name,
|
||||
'slug' => $this->faker->slug,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ class CreateCitiesTable extends Migration
|
||||
$table->id();
|
||||
$table->foreignId('country_id')->constrained()->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->string('name');
|
||||
$table->string('slug')->unique();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
@@ -59,14 +59,17 @@ class DatabaseSeeder extends Seeder
|
||||
City::create([
|
||||
'country_id' => 1,
|
||||
'name' => 'Füssen',
|
||||
'slug' => str('Füssen')->slug('-', 'de'),
|
||||
]);
|
||||
City::create([
|
||||
'country_id' => 2,
|
||||
'name' => 'Wien',
|
||||
'slug' => str('Wien')->slug('-', 'de'),
|
||||
]);
|
||||
City::create([
|
||||
'country_id' => 3,
|
||||
'name' => 'Zürich',
|
||||
'slug' => str('Zürich')->slug('-', 'de'),
|
||||
]);
|
||||
Venue::create([
|
||||
'city_id' => 1,
|
||||
|
||||
Reference in New Issue
Block a user