Skip to content

Commit c561d2a

Browse files
authored
Create PDFMerger.php (#17)
String (and Array) Helper functions are now removed in Laravel
1 parent 9301ea5 commit c561d2a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PDFMerger/PDFMerger.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use setasign\Fpdi\PdfParser\StreamReader;
1717
use Illuminate\Filesystem\Filesystem;
1818
use Illuminate\Support\Collection;
19+
use Illuminate\Support\Str;
1920

2021
class PDFMerger {
2122

@@ -145,7 +146,7 @@ public function setFileName($fileName){
145146
*/
146147
public function addString($string, $pages = 'all', $orientation = null){
147148

148-
$filePath = storage_path('tmp/'.str_random(16).'.pdf');
149+
$filePath = storage_path('tmp/'.Str::random(16).'.pdf');
149150
$this->oFilesystem->put($filePath, $string);
150151
$this->tmpFiles->push($filePath);
151152

0 commit comments

Comments
 (0)