{"id":15837068,"url":"https://github.com/inmanturbo/volt-csv-import-field-mapper","last_synced_at":"2026-02-10T16:16:18.129Z","repository":{"id":246084835,"uuid":"820018058","full_name":"inmanturbo/volt-csv-import-field-mapper","owner":"inmanturbo","description":"Component to allow user to map fields for csv imports","archived":false,"fork":false,"pushed_at":"2024-07-09T16:01:48.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T00:56:19.624Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Blade","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inmanturbo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-25T16:23:27.000Z","updated_at":"2024-07-09T16:01:51.000Z","dependencies_parsed_at":"2024-06-25T19:47:58.378Z","dependency_job_id":"2eb0bb13-20c1-438a-ac4e-a6519b087c70","html_url":"https://github.com/inmanturbo/volt-csv-import-field-mapper","commit_stats":null,"previous_names":["inmanturbo/volt-csv-import-field-mapper"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/inmanturbo/volt-csv-import-field-mapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inmanturbo%2Fvolt-csv-import-field-mapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inmanturbo%2Fvolt-csv-import-field-mapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inmanturbo%2Fvolt-csv-import-field-mapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inmanturbo%2Fvolt-csv-import-field-mapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inmanturbo","download_url":"https://codeload.github.com/inmanturbo/volt-csv-import-field-mapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inmanturbo%2Fvolt-csv-import-field-mapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29307134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T16:09:25.305Z","status":"ssl_error","status_checked_at":"2026-02-10T16:08:52.170Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-05T15:20:43.411Z","updated_at":"2026-02-10T16:16:18.113Z","avatar_url":"https://github.com/inmanturbo.png","language":"Blade","funding_links":[],"categories":[],"sub_categories":[],"readme":"# volt-csv-import-field-mapper\n\nComponent to allow user to map fields for csv imports\n\n## Tailwind Purge\n```\n'./vendor/inmanturbo/volt-csv-import-field-mapper/resources/views/**/*.blade.php',\n```\n\n## Usage\n\n```php\nuse Illuminate\\Support\\Facades\\Storage;\nuse Spatie\\SimpleExcel\\SimpleExcelReader;\nuse Inmanturbo\\ImportFieldMapper\\ImportFieldMapper;\nuse App\\Models\\Contact;\n\nuse function Livewire\\Volt\\{on, state};\n\nstate([\n\t'importMap' =\u003e [\n\t\t'display_name' =\u003e 'Display Name',\n\t\t'email' =\u003e 'Email',\n\t],\n\t\t'uploadDialog' =\u003e false,\n]);\n\non([\n\t'import-field-mapper-updated-uploaded-file' =\u003e\n\t\tfn($uploadedCsvPath) =\u003e\n\t\t\t$this-\u003euploadedCsvPath = Storage::path(\n\t\t\t\tconfig('import-field-mapper.path')\n\t\t\t\t. DIRECTORY_SEPARATOR\n\t\t\t\t. $uploadedCsvPath\n\t\t\t),\n\t'import-field-mapper-updated-mapped-import-fields' =\u003e\n\t\tfn($mappedImportFields) =\u003e\n\t\t\t$this-\u003emappedImportFields = $mappedImportFields,\n]);\n\n\n$importCsv = function () {\n   $path = Storage::path(config('import-field-mapper.path'). '/' . $this-\u003euploadedCsvFile);\n   $reader = SimpleExcelReader::create($path);\n\n    $reader-\u003egetRows()-\u003eeach(function ($row) {\n        $row = ImportFieldMapper::row($row)-\u003etoArray();\n\n        $action = new class($row, $this-\u003eimportMap, $this-\u003emappedImportFields) {\n            use \\Inmanturbo\\ImportFieldMapper\\HandlesMappedEloquentAttributes;\n\n            protected modelClass()\n            {\n                return \\App\\Models\\Contact::class;\n            }\n        }\n\n        $action-\u003ehandle();\n    });\n\n    $this-\u003euploadedCsvFile = null;\n    $this-\u003euploadDialog = false;\n    $this-\u003ebanner($reader-\u003egetRows()-\u003ecount() . ' Contacts imported successfully');\n};\n\n\u003cdiv\u003e\n\n    \u003cx-button wire:click=\"$set('uploadDialog', true)\" type=\"file\" class=\"justify-center w-full space-x-1 sm:w-40\"\u003e\n        {{_('Upload Csv')}}\n    \u003c/x-button\u003e\n\n    \u003cx-dialog-modal wire:model=\"uploadDialog\" maxWidth=\"full\"\u003e\n        \u003cx-slot name=\"title\"\u003e\n            {{ __('Import Contacts from CSV file') }}\n        \u003c/x-slot\u003e\n\n        \u003cx-slot name=\"content\"\u003e\n            @livewire('import-field-mapper', ['importFieldMap' =\u003e $this-\u003eimportMap,])\n        \u003c/x-slot\u003e\n        \n        \u003cx-slot name=\"footer\"\u003e\n            \u003cx-secondary-button wire:click=\"$set('uploadDialog', false)\" wire:loading.attr=\"disabled\"\u003e\n                {{ __('Cancel') }}\n            \u003c/x-secondary-button\u003e\n\n            \u003cx-button class=\"ml-3\" wire:click=\"importCsv\" wire:loading.attr=\"disabled\"\u003e\n                \u003cdiv wire:loading\u003e\n                    \u003csvg class=\"w-4 mr-2 animate-spin\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 28 28\" fill=\"none\" stroke-width=\"3\"\u003e\u003ccircle cx=\"14\" cy=\"14\" r=\"12\" stroke=\"currentColor\" class=\"opacity-25\"\u003e\u003c/circle\u003e\u003cpath d=\"M26 14c0-6.627-5.373-12-12-12\" stroke-linecap=\"round\" stroke=\"currentColor\" class=\"opacity-75\"\u003e\u003c/path\u003e\u003c/svg\u003e\n                \u003c/div\u003e\n                {{ __('Save') }}\n            \u003c/x-button\u003e\n        \u003c/x-slot\u003e\n    \u003c/x-dialog-modal\u003e\n\u003c/div\u003e\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finmanturbo%2Fvolt-csv-import-field-mapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finmanturbo%2Fvolt-csv-import-field-mapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finmanturbo%2Fvolt-csv-import-field-mapper/lists"}