PHPackages                             timsinakiran/filament-import - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. timsinakiran/filament-import

ActiveLibrary

timsinakiran/filament-import
============================

A fork of konnco/filament-import with support of Laravel 11 since the default importer of Filament 3 is nonsense for basic use case.

v2.0.0(3mo ago)04.0k↑55.6%1MITPHPPHP ^8.2CI failing

Since Jul 25Pushed 3mo agoCompare

[ Source](https://github.com/timsinakiran/filament-import)[ Packagist](https://packagist.org/packages/timsinakiran/filament-import)[ RSS](/packages/timsinakiran-filament-import/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (19)Versions (7)Used By (0)

Filament Plugin for Import CSV and XLS into Database
====================================================

[](#filament-plugin-for-import-csv-and-xls-into-database)

This package will make it easier for you to import from files to your model, very easily without the need to do templates.

all you have to do is drag and drop and match the fields and columns of your file, and let magic happens!

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require timsinakiran/filament-import
```

Publishing Config
-----------------

[](#publishing-config)

If you want to do the settings manually, please publish the existing config.

```
php artisan vendor:publish --tag=filament-import-config
```

Usage
-----

[](#usage)

import the actions into `ListRecords` page

```
use Konnco\FilamentImport\Actions\ImportAction;
use Konnco\FilamentImport\Actions\ImportField;

class ListCredentialDatabases extends ListRecords
{
    protected static string $resource = CredentialDatabaseResource::class;

    protected function getActions(): array
    {
        return [
            ImportAction::make()
                ->fields([
                    ImportField::make('project')
                        ->label('Project')
                        ->helperText('Define as project helper'),
                    ImportField::make('manager')
                        ->label('Manager'),
                ])
        ];
    }
}
```

### Required Field

[](#required-field)

```
protected function getActions(): array
{
    return [
        ImportAction::make()
            ->fields([
                ImportField::make('project')
                    ->label('Project')
                    ->required(),
            ])
    ];
}
```

### Disable Mass Create

[](#disable-mass-create)

if you still want to stick with the event model you might need this and turn off mass create

```
protected function getActions(): array
{
    return [
        ImportAction::make()
            ->massCreate(false)
            ->fields([
                ImportField::make('project')
                    ->label('Project')
                    ->required(),
            ])
    ];
}
```

### Filter Out Blank Rows

[](#filter-out-blank-rows)

If you have a spreadsheet which includes blank data [click here to see more](https://thesoftwarepro.com/excel-tips-how-to-fill-blank-cells/), you can filter these out:

```
protected function getActions(): array
{
    return [
        ImportAction::make()
            ->handleBlankRows(true)
            ->fields([
                ImportField::make('project')
                    ->label('Project')
                    ->required(),
            ])
    ];
}
```

### Field Data Mutation

[](#field-data-mutation)

you can also manipulate data from row spreadsheet before saving to model

```
protected function getActions(): array
{
    return [
        ImportAction::make()
            ->fields([
                ImportField::make('project')
                    ->label('Project')
                    ->mutateBeforeCreate(fn($value) => Str::of($value)->camelCase())
                    ->required(),
            ])
    ];
}
```

otherwise you can manipulate data and getting all mutated data from field before its getting insert into the database.

```
protected function getActions(): array
{
    return [
        ImportAction::make()
            ->fields([
                ImportField::make('email')
                    ->label('Email')
                    ->required(),
            ])->mutateBeforeCreate(function($row){
                $row['password'] = bcrypt($row['email']);

                return $row;
            })
    ];
}
```

it is also possible to manipulate data after it was inserted into the database

```
use Illuminate\Database\Eloquent\Model;

protected function getActions(): array
{
    return [
        ImportAction::make()
            ->fields([
                ImportField::make('email')
                    ->label('Email')
                    ->required(),
            ])->mutateAfterCreate(function(Model $model, $row){
                // do something with the model

                return $model;
            })
    ];
}
```

### Grid Column

[](#grid-column)

Of course, you can divide the column grid into several parts to beautify the appearance of the data map

```
protected function getActions(): array
{
    return [
        ImportAction::make()
            ->fields([
                ImportField::make('project')
                    ->label('Project')
                    ->required(),
            ], columns:2)
    ];
}
```

### Json Format Field

[](#json-format-field)

We also support the json format field, which you can set when calling the `make` function and separate the name with a dot annotation

```
protected function getActions(): array
{
    return [
        ImportAction::make()
            ->fields([
                ImportField::make('project.en')
                    ->label('Project In English')
                    ->required(),
                ImportField::make('project.id')
                    ->label('Project in Indonesia')
                    ->required(),
            ], columns:2)
    ];
}
```

### Static Field Data

[](#static-field-data)

for the static field data you can use the common fields from filament

```
use Filament\Forms\Components\Select;

protected function getActions(): array
{
    return [
        ImportAction::make()
            ->fields([
                ImportField::make('name')
                    ->label('Project')
                    ->required(),
                Select::make('status')
                    ->options([
                        'draft' => 'Draft',
                        'reviewing' => 'Reviewing',
                        'published' => 'Published',
                    ])
            ], columns:2)
    ];
}
```

### Unique field

[](#unique-field)

if your model should be unique, you can pass the name of the field, which will be used to check if a row already exists in the database. if it exists, skip that row (preventing an error about non unique row)

```
use Filament\Forms\Components\Select;

protected function getActions(): array
{
    return [
        ImportAction::make()
            ->uniqueField('email')
            ->fields([
                ImportField::make('email')
                    ->label('Email')
                    ->required(),
            ], columns:2)
    ];
}
```

### Validation

[](#validation)

you can make the validation for import fields, for more information about the available validation please check laravel documentation

```
use Filament\Forms\Components\Select;

protected function getActions(): array
{
    return [
        ImportAction::make()
            ->fields([
                ImportField::make('name')
                    ->label('Project')
                    ->rules('required|min:10|max:255'),
            ], columns:2)
    ];
}
```

### Create Record

[](#create-record)

you can overide the default record creation closure and put your own code by using `handleRecordCreation` function

```
use Filament\Forms\Components\Select;

protected function getActions(): array
{
    return [
        ImportAction::make()
            ->fields([
                ImportField::make('name')
                    ->label('Project')
                    ->rules('required|min:10|max:255'),
            ], columns:2)
            ->handleRecordCreation(function($data){
                return Post::create($data);
            })
    ];
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/konnco/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance82

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~189 days

Total

4

Last Release

95d ago

Major Versions

1.1 → v2.0.02026-02-12

PHP version history (2 changes)1.0PHP ^8.0

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/351e3224dcfda5f2fc1a86fb6424f60a9a060a39c938c6338a244d01912e077d?d=identicon)[kiran1991](/maintainers/kiran1991)

---

Top Contributors

[![frankyso](https://avatars.githubusercontent.com/u/5705520?v=4)](https://github.com/frankyso "frankyso (136 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (11 commits)")[![timsinakiran](https://avatars.githubusercontent.com/u/50225225?v=4)](https://github.com/timsinakiran "timsinakiran (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")[![adriaardila](https://avatars.githubusercontent.com/u/2029010?v=4)](https://github.com/adriaardila "adriaardila (6 commits)")[![arjen-mediasoep](https://avatars.githubusercontent.com/u/122452581?v=4)](https://github.com/arjen-mediasoep "arjen-mediasoep (3 commits)")[![Saifallak](https://avatars.githubusercontent.com/u/6053156?v=4)](https://github.com/Saifallak "Saifallak (2 commits)")[![rizkyanfasafm](https://avatars.githubusercontent.com/u/24226461?v=4)](https://github.com/rizkyanfasafm "rizkyanfasafm (2 commits)")[![ster](https://avatars.githubusercontent.com/u/59856?v=4)](https://github.com/ster "ster (2 commits)")[![tiagof](https://avatars.githubusercontent.com/u/1729910?v=4)](https://github.com/tiagof "tiagof (2 commits)")[![byt3sage](https://avatars.githubusercontent.com/u/61322528?v=4)](https://github.com/byt3sage "byt3sage (2 commits)")[![alex552](https://avatars.githubusercontent.com/u/21161486?v=4)](https://github.com/alex552 "alex552 (2 commits)")[![archilex](https://avatars.githubusercontent.com/u/6097099?v=4)](https://github.com/archilex "archilex (2 commits)")[![tryoasnafi](https://avatars.githubusercontent.com/u/61939827?v=4)](https://github.com/tryoasnafi "tryoasnafi (1 commits)")[![jeffersonGlemos](https://avatars.githubusercontent.com/u/8877254?v=4)](https://github.com/jeffersonGlemos "jeffersonGlemos (1 commits)")[![mtawil](https://avatars.githubusercontent.com/u/700753?v=4)](https://github.com/mtawil "mtawil (1 commits)")[![Namrata199](https://avatars.githubusercontent.com/u/71477150?v=4)](https://github.com/Namrata199 "Namrata199 (1 commits)")[![abduromanov](https://avatars.githubusercontent.com/u/37548312?v=4)](https://github.com/abduromanov "abduromanov (1 commits)")

---

Tags

laravelimportfilament-import

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/timsinakiran-filament-import/health.svg)

```
[![Health](https://phpackages.com/badges/timsinakiran-filament-import/health.svg)](https://phpackages.com/packages/timsinakiran-filament-import)
```

###  Alternatives

[konnco/filament-import

241243.2k2](/packages/konnco-filament-import)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[kirschbaum-development/commentions

A package to allow you to create comments, tag users and more

12369.2k](/packages/kirschbaum-development-commentions)[a2insights/filament-saas

Filament Saas for A2Insights

161.1k](/packages/a2insights-filament-saas)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
