Files
mareike/app/Providers/FileWriteProvider.php

20 lines
440 B
PHP

<?php
namespace App\Providers;
use Illuminate\Support\Facades\Storage;
class FileWriteProvider {
public string $fileName;
public string $fileContent;
public function __construct(string $fileName, string $fileContent) {
$this->fileName = $fileName;
$this->fileContent = $fileContent;
}
public function writeToFile() {
Storage::disk('local')->put($this->fileName, $this->fileContent);
}
}