> For the complete documentation index, see [llms.txt](https://sprnva.gitbook.io/sprnva-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sprnva.gitbook.io/sprnva-docs/database/seeder.md).

# Seeder

Insert multiple data against the database or seed data to the database with a selected table and set the number of iterations and column values using the seeder method.

```php
// DB()->seeder($table, $length, $tableColumns = []);

// using the seeder
Route::get('/seed', function () {

    $table = "customers";
    $length = 1000;
    $user_id = Auth::user('id');

    $tableColumns = [
        "name" => randChar(7),
        "address" => randChar(),
        "user_id" => $user_id
    ];

    $response = DB()->seeder($table, $length, $tableColumns);
    echo $response;
});
```

this will seed datas to the selected table which is `customers` with the number of `1000` iterations and a column names with values to seed from the `$tableColumns`.
