Looking to hire Laravel developers? Try LaraJobs

laravel-gdc-info maintained by think.studio

Description
GDC info parser
Last update
2023/09/22 15:29 (dev-main)
License
Downloads
23
Tags

Comments
comments powered by Disqus

GDC Info checker

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