1. Go to this page and download the library: Download pnscripts/sheafgate-lite library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pnscripts / sheafgate-lite example snippets
use PNScripts\SheafgateLite\ImportAction; // was: use Filament\Actions\ImportAction;
protected function getHeaderActions(): array
{
return [
ImportAction::make()->importer(ProductImporter::class),
];
}
ImportAction::make()
->importer(ProductImporter::class)
->headerOffset(2) // the header is in row 3 (otherwise it is found automatically)
->headerRowField(false) // hide the "Header row" field
->csvEncoding('Windows-1251') // when you know it (otherwise detected)
->csvDelimiter(';') // when you know it (otherwise detected)