Skip to content

Package to parse GEDCOM files, and import them into Laravel. Export GEDCOM 5.5.1 files from Laravel.

License

Notifications You must be signed in to change notification settings

cgdsoftware/laravel-gedcom

 
 

Repository files navigation

GEDCOM to Laravel Model

Latest Stable Version Scrutinizer Code Quality Build Status Code Intelligence Status StyleCI CodeFactor codebeat badge Build Status

familytree365/laravel-gedcom is a package to parse GEDCOM files, and import them as Laravel models, inside your Laravel application. It is used by: (https://github.com/familytree365/genealogy)

Installation

composer require familytree365/laravel-gedcom

Usage

You must create the database schema before doing anything, so run the migrations:

php artisan migrate

via Command Line

php artisan gedcom:import /path/to/your/gedcom/file.ged

via Facade

use FamilyTree365\LaravelGedcom\Facades\GedcomParserFacade;
$filename = '/path/to/your/gedcom/file.ged';
GedcomParserFacade::parse($filename, true);

via Instantiation

use \FamilyTree365\LaravelGedcom\Utils\GedcomParser;
$filename = '/path/to/your/gedcom/file.ged';
$parser = new GedcomParser();
$parser->parse($filename, true);

Documentation

Database

This package will create the database tables, which map to models.

parse() Method

The parse() method takes three parameters, string $filename, bool $progressBar = false and string $conn If you set $progressBar to true, a ProgressBar will be output to php://stdout, which is useful when you are calling the parser from Artisan commands.

Contributing

Pull requests are welcome, as are issues.

Contributors

License

MIT License (see License.md). This means you must retain the copyright and permission notice is all copies, or substantial portions of this software.

About

Package to parse GEDCOM files, and import them into Laravel. Export GEDCOM 5.5.1 files from Laravel.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages

  • PHP 100.0%