pedrosoares / sqlfileloader
Manipulate SQL files.
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/pedrosoares/sqlfileloader
Requires
- php: >=5.5.9
This package is not auto-updated.
Last update: 2025-10-06 18:01:51 UTC
README
Read the SQL file, remove all comments, and separate each command for manipulation.
Instation
Put in your composer file the command bellow.
"pedrosoares/sqlfileloader": "1.0.*"
The field "require" shoud be like:
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"pedrosoares/sqlfileloader": "1.0.*"
}
How use
To load a file and get all sql commands, you can do in this way:
$c = new SqlFileLoader("PATH to the sql file");
foreach($c->getStatements() as $sqlCommand){
DB::statement($sqlCommand);
}