Skip to content

Commit b02bc7c

Browse files
authored
Merge pull request #24 from devianl2/4.x
4.x
2 parents f12d584 + da9e202 commit b02bc7c

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ Highlight of this package:
2020

2121

2222
## Step 1:
23-
Install from composer (For flysystem v2)
23+
Install from composer (For flysystem v1)
2424
```sh
2525
composer require devianl2/laravel-scorm:"^3.0"
2626
```
2727

28-
Install from composer (For flysystem v3)
28+
Install from composer (For flysystem v2/v3)
2929
```sh
3030
composer require devianl2/laravel-scorm
3131
```
@@ -133,3 +133,7 @@ Update your Scorm table:
133133
- Change hash_name to title
134134
- Remove origin_file_mime field
135135

136+
***Upgrade from version 3 to 4:***
137+
Update your Scorm table:
138+
- Add identifier (varchar 191)
139+

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"require": {
1313
"php": "^7.4 || ^8.0",
1414
"doctrine/common": "^3.1",
15+
"league/flysystem": "^2.0 || ^3.0",
1516
"nesbot/carbon": "^2.42",
1617
"ext-zip": "*",
1718
"ext-dom": "*"

database/migrations/create_scorm_tables.php.stub

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class CreateScormTables extends Migration
2828
$table->string('version');
2929
$table->double('ratio')->nullable();
3030
$table->string('uuid');
31+
$table->string('identifier');
3132
$table->string('entry_url')->nullable();
3233
$table->timestamps();
3334
});

src/Manager/ScormDisk.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function unzipper($file, $target_dir)
3333
$disk->createDir($destination);
3434
continue;
3535
}
36-
$disk->putStream($destination, $unzipper->getStream($zipEntryName));
36+
$disk->writeStream($destination, $unzipper->getStream($zipEntryName));
3737
}
3838
return true;
3939
}

src/Model/ScormModel.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class ScormModel extends Model
3030
'version',
3131
'ratio',
3232
'uuid',
33+
'identifier',
3334
'entry_url',
3435
'created_at',
3536
'updated_at',

0 commit comments

Comments
 (0)