1. Go to this page and download the library: Download zappzerapp/laravel-ingest 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/ */
zappzerapp / laravel-ingest example snippets
namespace App\Ingest;
use App\Models\User;
use LaravelIngest\Contracts\IngestDefinition;
use LaravelIngest\IngestConfig;
use LaravelIngest\Enums\SourceType;
use LaravelIngest\Enums\DuplicateStrategy;
class UserImporter implements IngestDefinition
{
public function getConfig(): IngestConfig
{
return IngestConfig::for(User::class)
->fromSource(SourceType::UPLOAD)
->keyedBy('email') // Identify records by email
->onDuplicate(DuplicateStrategy::UPDATE) // Update if exists
// Map CSV columns to DB attributes
->map('Full Name', 'name')
->map(['E-Mail', 'Email Address'], 'email') // Supports aliases
// Handle Relationships automatically
->relate('Role', 'role', Role::class, 'slug', createIfMissing: true)
// Validate rows before processing
->validate([
'email' => '
use LaravelIngest\IngestServiceProvider;
public function register(): void
{
$this->app->tag([UserImporter::class], IngestServiceProvider::INGEST_DEFINITION_TAG);
}