Configuration
Overview
After publishing the configuration file with php artisan vendor:publish --tag=tapix-config, you will find it at config/tapix.php. This page documents every available option grouped by purpose.
File Upload
max_file_size
Maximum upload file size in bytes. Files exceeding this limit are rejected before processing begins.
- Default:
10485760(10 MB)
'max_file_size' => 10 * 1024 * 1024,
Adjust this value based on your server's upload_max_filesize and post_max_size PHP settings. The lower of the three values applies.
max_rows
Maximum number of rows allowed in a single import file. The wizard rejects files that exceed this count during the upload step.
- Default:
10000
'max_rows' => 10_000,
For very large imports, consider increasing this alongside appropriate queue timeout values.
Queue Processing
chunk_size
Number of rows processed per queued job. Each chunk is dispatched as a separate job, allowing parallel processing and reducing memory usage.
- Default:
500
'chunk_size' => 500,
Lower values reduce memory consumption per job but increase the total number of jobs. Higher values process faster but require more memory.
queue
The queue connection name used for import processing jobs.
- Default:
'default' - Environment variable:
TAPIX_QUEUE
'queue' => env('TAPIX_QUEUE', 'default'),
Use a dedicated queue for imports to avoid blocking other jobs. For example, set TAPIX_QUEUE=imports in your .env file and run a separate worker:
php artisan queue:work --queue=imports
job_timeout
Maximum execution time in seconds for each chunk processing job. If a job exceeds this duration, the queue worker terminates it.
- Default:
300(5 minutes)
'job_timeout' => 300,
Your queue connection's retry_after value must exceed job_timeout to prevent overlapping job execution. For example, if job_timeout is 300, set retry_after to at least 330.
retry_after value is configured on your queue connection in config/queue.php, not in the Tapix configuration. Ensure it exceeds the job_timeout for whichever connection Tapix uses.job_tries
Maximum number of attempts for each chunk processing job before it is marked as failed.
- Default:
3
'job_tries' => 3,
job_backoff
Delay in seconds between retry attempts. Accepts an integer for a fixed delay or an array for progressive backoff.
- Default:
[10, 30]
'job_backoff' => [10, 30],
With the default value, the first retry waits 10 seconds and the second retry waits 30 seconds.
Database
table_prefix
Prefix applied to all database tables created by Tapix. This prevents naming conflicts with your application's existing tables.
- Default:
'tapix_'
'table_prefix' => 'tapix_',
If you change this value after running migrations, you must manually rename the existing tables or run a fresh migration.
Multi-Tenancy
The tenant configuration group controls multi-tenant scoping. When enabled, all imports are automatically scoped to the current tenant.
tenant.enabled
Enable or disable tenant scoping.
- Default:
false
'tenant' => [
'enabled' => false,
],
tenant.column
The database column name used to store the tenant identifier on import records.
- Default:
'tenant_id'
'tenant' => [
'column' => 'tenant_id',
],
tenant.model
The fully qualified class name of your tenant model. Set this to the Eloquent model that represents a tenant in your application.
- Default:
null
'tenant' => [
'model' => null,
],
When using Filament's built-in multi-tenancy, Tapix resolves the current tenant from the Filament panel automatically. Set the model here only if you need to override that behavior.
File Readers
readers
A map of file extensions to reader classes. Tapix uses these to determine how to parse an uploaded file based on its extension.
- Default:
'readers' => [
'csv' => \Tapix\Core\Importing\Readers\CsvReader::class,
'txt' => \Tapix\Core\Importing\Readers\CsvReader::class,
'xlsx' => \Tapix\Core\Importing\Readers\XlsxReader::class,
],
You can register custom reader classes for additional file formats. Each reader must implement the Tapix\Core\Contracts\FileReader interface. See the Custom Readers section for details.
Custom Fields
custom_fields_adapter
An optional adapter class that integrates Tapix with a custom fields or dynamic attributes system. When set, the import wizard displays custom fields alongside standard model attributes.
- Default:
null
'custom_fields_adapter' => null,
The adapter must implement the Tapix\Core\Contracts\CustomFieldsAdapter interface.
Notifications
notifications.enabled
Whether to send a notification when an import completes (or fails).
- Default:
true
'notifications' => [
'enabled' => true,
],
notifications.class
The notification class dispatched when an import finishes. You can replace this with a custom notification to change the message content, channels, or recipients.
- Default:
Tapix\Core\Notifications\ImportCompletedNotification::class
'notifications' => [
'class' => \Tapix\Core\Notifications\ImportCompletedNotification::class,
],
The custom notification class receives the completed Import model as a constructor argument.
Cleanup
cleanup_after_days
Number of days to retain completed import records and their associated temporary data. The tapix:cleanup scheduled command deletes records older than this value.
- Default:
30
'cleanup_after_days' => 30,
To enable automatic cleanup, schedule the command in your application:
use Illuminate\Support\Facades\Schedule;
Schedule::command('tapix:cleanup')->daily();
Importer Discovery
importer_directories
An array of directory paths where Tapix looks for importer classes. The discoverImporters() method on TapixPlugin scans these directories to register importers automatically.
- Default:
[app_path('Importers')]
'importer_directories' => [
app_path('Importers'),
],
Add additional directories if you organize importers across multiple locations, such as within domain-specific folders.
importer_namespace
The PHP namespace corresponding to the default importer directory. This is used when generating new importer classes with the make:tapix-importer Artisan command.
- Default:
'App\\Importers'
'importer_namespace' => 'App\\Importers',
Routes
Tapix can register its own routes for handling file uploads and import progress outside of the Filament panel.
routes.enabled
Whether Tapix should register its own routes.
- Default:
true
'routes' => [
'enabled' => true,
],
Set to false if you only use Tapix through the Filament panel and do not need standalone routes.
routes.prefix
The URL prefix for Tapix routes.
- Default:
'imports'
'routes' => [
'prefix' => 'imports',
],
routes.domain
An optional domain constraint for Tapix routes. When set, routes are only accessible on this domain.
- Default:
null
'routes' => [
'domain' => null,
],
routes.middleware
Middleware applied to all Tapix routes.
- Default:
['web', 'auth']
'routes' => [
'middleware' => ['web', 'auth'],
],
Add additional middleware as needed, such as verified or a custom authorization middleware.