GDC info parser
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"
- Create settings table
public function up() {
Schema::create( config('gdc-info.tables.gdc_info'), function ( Blueprint $table ) {
\GDCInfo\MigrationHelper::defaultColumns($table);
} );
}
- 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);
}
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;