Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Commit

Permalink
Working gedcom upload
Browse files Browse the repository at this point in the history
  • Loading branch information
curtisdelicata committed Jun 3, 2020
1 parent 39e7865 commit ec9557d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
12 changes: 1 addition & 11 deletions app/Http/Controllers/Gedcom/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
}
Expand All @@ -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);
}

}
2 changes: 1 addition & 1 deletion app/Person.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}

Expand All @@ -25,6 +26,7 @@ public function down()
$table->dropColumn('sex');
$table->dropColumn('description');
$table->dropColumn('child_in_family_id');
$table->dropColumn('deleted_at');
});
}
}

0 comments on commit ec9557d

Please sign in to comment.