diff --git a/app/Gender.php b/app/Gender.php index e4efa37f..7b2c25eb 100644 --- a/app/Gender.php +++ b/app/Gender.php @@ -6,9 +6,5 @@ use Illuminate\Database\Eloquent\Model; class Gender extends Model { - public $fillable = ['name', 'is_null', 'nami_id']; - - public $casts = [ - 'is_null' => 'boolean' - ]; + public $fillable = ['name', 'nami_id']; } diff --git a/app/Initialize/InitializeGenders.php b/app/Initialize/InitializeGenders.php index a0c3c86e..9793011f 100644 --- a/app/Initialize/InitializeGenders.php +++ b/app/Initialize/InitializeGenders.php @@ -6,7 +6,6 @@ class InitializeGenders { private $bar; private $api; - public $nullName = 'Keine Angabe'; public function __construct($bar, $api) { $this->bar = $bar; @@ -16,7 +15,7 @@ class InitializeGenders { public function handle() { $this->bar->task('Synchronisiere Geschlechter', function() { $this->api->genders()->each(function($gender) { - \App\Gender::create(['nami_id' => $gender->id, 'name' => $gender->name, 'is_null' => $gender->name === $this->nullName]); + \App\Gender::create(['nami_id' => $gender->id, 'name' => $gender->name]); }); }); } diff --git a/app/Member/MemberController.php b/app/Member/MemberController.php index afd3d579..2c19f127 100644 --- a/app/Member/MemberController.php +++ b/app/Member/MemberController.php @@ -27,7 +27,7 @@ class MemberController extends Controller session()->put('title', 'Mitglied bearbeiten'); return \Inertia::render('member/Edit', [ - 'genders' => Gender::where('is_null', false)->get()->pluck('name', 'id'), + 'genders' => Gender::get()->pluck('name', 'id'), 'countries' => Country::get()->pluck('name', 'id'), 'regions' => Region::where('is_null', false)->get()->pluck('name', 'id'), 'nationalities' => Nationality::get()->pluck('name', 'id'), diff --git a/database/migrations/2017_07_05_000438_create_genders_table.php b/database/migrations/2017_07_05_000438_create_genders_table.php index 3fc319f3..3fc4a3b9 100644 --- a/database/migrations/2017_07_05_000438_create_genders_table.php +++ b/database/migrations/2017_07_05_000438_create_genders_table.php @@ -16,7 +16,6 @@ class CreateGendersTable extends Migration Schema::create('genders', function (Blueprint $table) { $table->id(); $table->string('name'); - $table->boolean('is_null'); $table->integer('nami_id'); $table->timestamps(); });