diff --git a/app/Http/Controllers/Gedcom/Store.php b/app/Http/Controllers/Gedcom/Store.php index 7fd6c2dad..883b311a1 100644 --- a/app/Http/Controllers/Gedcom/Store.php +++ b/app/Http/Controllers/Gedcom/Store.php @@ -23,7 +23,7 @@ public function __invoke(Request $request) if ($request->hasFile('file')) { if ($request->file('file')->isValid()) { $request->file->storeAs('gedcom', 'file.ged'); - $this->readData($request->file); + GedcomParserFacade::parse($request->file('file'), true); return ['File uploaded']; } @@ -34,14 +34,4 @@ public function __invoke(Request $request) return ['Not uploaded']; } - /* - * Read ged file - */ - - public function readData($filename) - { - $filename = $this->filename; - GedcomParserFacade::parse($filename, true); - } - } diff --git a/app/Person.php b/app/Person.php index f1fbdca7c..ab9749de2 100644 --- a/app/Person.php +++ b/app/Person.php @@ -5,7 +5,7 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; -class Person extends LaravelEnso\People\app\Person +class Person extends \LaravelEnso\People\app\Models\Person { use SoftDeletes; diff --git a/database/migrations/2020_04_10_154850_create_families_table.php b/database/migrations/2020_04_10_154850_create_families_table.php index 3dd58010c..89613b67f 100644 --- a/database/migrations/2020_04_10_154850_create_families_table.php +++ b/database/migrations/2020_04_10_154850_create_families_table.php @@ -15,12 +15,13 @@ public function up() { Schema::create('families', function (Blueprint $table) { $table->increments('id'); - $table->text('description'); + $table->text('description')->nullable(); $table->integer('is_active'); $table->integer('type_id'); $table->integer('husband_id')->references('id')->on('persons')->nullable(); $table->integer('wife_id')->references('id')->on('persons')->nullable(); $table->timestamps(); + $table->softDeletes(); }); } diff --git a/database/migrations/2020_06_03_192100_add_columns_for_people_table.php b/database/migrations/2020_06_03_192100_add_columns_for_people_table.php index 8de3121eb..de16bdbd3 100644 --- a/database/migrations/2020_06_03_192100_add_columns_for_people_table.php +++ b/database/migrations/2020_06_03_192100_add_columns_for_people_table.php @@ -14,6 +14,7 @@ public function up() $table->char('sex', 1)->nullable(); $table->text('description')->nullable(); $table->integer('child_in_family_id')->references('id')->on('families')->nullable(); + $table->softDeletes(); }); } @@ -25,6 +26,7 @@ public function down() $table->dropColumn('sex'); $table->dropColumn('description'); $table->dropColumn('child_in_family_id'); + $table->dropColumn('deleted_at'); }); } }