yaroslawww/laravel-gdc-info

This package is abandoned and no longer maintained. The author suggests using the think.studio/laravel-gdc-info package instead.

GDC info parser

1.1.1 2023-09-22 13:29 UTC

This package is auto-updated.

Last update: 2023-09-22 13:30:10 UTC


README

Packagist License Packagist Version Total Downloads Build Status Code Coverage Scrutinizer Code Quality

GDC info parser

Installation

Install the package via composer:

composer require think.studio/laravel-gdc-info

Optionally you can publish the config file with:

php artisan vendor:publish --provider="GDCInfo\ServiceProvider" --tag="config"

Installation

  1. Create settings table
public function up() {
    Schema::create( config('gdc-info.tables.gdc_info'), function ( Blueprint $table ) {
        \GDCInfo\MigrationHelper::defaultColumns($table);
    } );
}
  1. Set your model in AppServiceProvider if you need
namespace App\Models;

class GDCInfo extends \GDCInfo\Models\GDCInfo
{
}
public function register()
{
    GDCChecker::useModel(\App\Models\GDCInfo::class);
}

Usage

Direct call (you can use it without model and table):

$gdcInfo = GDCInfoFromHtmlFlow::make()->get('060702');
// or
$gdcInfo = GDCInfoFromHtmlFlow::make()->get(60702);

$gdcInfo->gdc();
$gdcInfo->firstName();
$gdcInfo->lastName();
$gdcInfo->status();
$gdcInfo->registrantType();
$gdcInfo->qualifications();
$gdcInfo->firstRegisteredOn();
$gdcInfo->currentPeriodFrom();
$gdcInfo->additionalInfo();

Using Model:

$gdcInfo = GDCInfo::findOrFetch(60702);

$gdcInfo->getKey();
$gdcInfo->last_name;

Credits

  • Think Studio