Skip to content

Commit 90e42b2

Browse files
committed
docs: links to requirements
1 parent 713811f commit 90e42b2

File tree

1 file changed

+10
-31
lines changed

1 file changed

+10
-31
lines changed

README.md

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@ A Laravel package that allows you to easily load data into Oracle database using
1010

1111
## Requirements
1212

13-
- Oracle Instant Client
14-
- Oracle SQL Loader
15-
- Laravel 10.x or higher
16-
- Laravel OCI8 10.x or higher
13+
- [Oracle Instant Client with Tools Package](https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html)
14+
- [Laravel 10.x](https://laravel.com) or higher
15+
- [Laravel OCI8](https://yajrabox.com/docs/laravel-oci8) 10.x or higher
16+
17+
## Prerequisites
18+
19+
- Before you can use this package, you need to install the Oracle Instant Client with Tools Package. You can download the package from the [Oracle website](https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html).
20+
- You should also take note of the path where the `sqlldr` executable is located.
21+
- Knowledge of how to use `sqlldr` is also required. You can read the documentation [here](https://docs.oracle.com/en/database/oracle/oracle-database/23/sutil/oracle-sql-loader.html#GUID-8D037494-07FA-4226-B507-E1B2ED10C144).
1722

1823
## Installation
1924

@@ -23,33 +28,7 @@ You can install the package via composer:
2328
composer require yajra/laravel-sql-loader:^1.0
2429
```
2530

26-
## Usage
27-
28-
Basic usage:
29-
30-
```php
31-
$loader = Yajra\SQLLoader\SQLLoader::make();
32-
$loader->inFile(database_path('files/employees.csv'))
33-
->as('employees.ctl')
34-
->options(['skip=1'])
35-
->mode(Yajra\SQLLoader\Mode::TRUNCATE)
36-
->into(
37-
table: 'employees',
38-
columns: [
39-
'name',
40-
'dept_id',
41-
],
42-
terminatedBy: ',',
43-
enclosedBy: '"',
44-
trailing: true
45-
)
46-
->disk('local')
47-
->execute();
48-
49-
return nl2br($loader->logs());
50-
```
51-
52-
## Example
31+
## Quick Start
5332

5433
Create a CSV file named `employees.csv` inside `database/files` directory.
5534

0 commit comments

Comments
 (0)