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
Requires
- php: ^8.1
- ext-dom: *
- illuminate/support: ^9.0|^10.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.21
- guzzlehttp/guzzle: ^7.8
- orchestra/testbench: ^8.5
- phpunit/phpunit: ^10.2
- psalm/plugin-laravel: ^2.8
- vimeo/psalm: ^5.13
README
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
- 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); }
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;