https://github.com/liberu-genealogy/laravel-gedcom
Gedcom reading and writing for Laravel 11
https://github.com/liberu-genealogy/laravel-gedcom
gedcom gedcom-parser gedcom-parsing genealogy genealogy-application laravel laravel11 php php8
Last synced: 21 days ago
JSON representation
Gedcom reading and writing for Laravel 11
- Host: GitHub
- URL: https://github.com/liberu-genealogy/laravel-gedcom
- Owner: liberu-genealogy
- License: mit
- Created: 2023-05-14T19:46:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-23T23:51:31.000Z (about 1 month ago)
- Last Synced: 2025-03-26T08:01:57.175Z (28 days ago)
- Topics: gedcom, gedcom-parser, gedcom-parsing, genealogy, genealogy-application, laravel, laravel11, php, php8
- Language: PHP
- Homepage: https://www.liberu.co.uk
- Size: 688 KB
- Stars: 78
- Watchers: 3
- Forks: 49
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# GEDCOM to Laravel Model

[](https://github.com/liberu-genealogy/laravel-gedcom/actions/workflows/run-tests.yml)liberu-genealogy/laravel-gedcom is a package to parse [GEDCOM](https://en.wikipedia.org/wiki/GEDCOM) files, and import them
as Laravel models, inside your Laravel application. It is used by:
(https://github.com/liberu-genealogy/genealogy-laravel)* laravel-gedcom 5.0+ requires PHP 8.3 (or later).
* laravel-gedcom 6.0+ requires PHP 8.4 (or later).## Installation
```
composer require liberu-genealogy/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.