CSV Component

Using this package is a breeze. To implmenent the importer in your project, simply include the following component inside a Blade view.

1<livewire:csv-importer :model="App\Models\YourModel::class"
2 :columns-to-map="['id', 'name', 'email', 'password']"
3 :required-columns="['id', 'name', 'email']"
4 :columns-label="[
5 'id' => 'ID',
6 'name' => 'Name',
7 'email' => 'Email Address',
8 'password' => 'Password',
9 ]"/>
Props Type Description
model string Fully qualified name of the model you wish to import to
columns-to-map array Column names in the target database table
required-columns array Columns that are required by validation for import
columns-label array Display labels for the required columns

Join our newsletter

Subscribe to Our Newsletter and never miss our offers, latest news, Articles, etc.

We care about the protection of your data. Read our Privacy Policy.