fixed storage
path
This commit is contained in:
parent
4d7aca4c9d
commit
aa1251a1c6
@ -7,6 +7,7 @@ use App\Http\Requests\Portal\InvoicePayment as PaymentRequest;
|
||||
use App\Models\Document\Document;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Monolog\Logger;
|
||||
use Monolog\Handler\StreamHandler;
|
||||
|
||||
@ -161,7 +162,7 @@ abstract class PaymentController extends BaseController
|
||||
public function getLogger()
|
||||
{
|
||||
$log = new Logger($this->alias);
|
||||
$log->pushHandler(new StreamHandler(storage_path('logs/' . $this->alias . '.log')), Logger::INFO);
|
||||
$log->pushHandler(new StreamHandler(Storage::path('logs/' . $this->alias . '.log')), Logger::INFO);
|
||||
|
||||
return $log;
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Filesystem\Filesystem;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class StorageTempClear extends Command
|
||||
{
|
||||
@ -31,7 +32,7 @@ class StorageTempClear extends Command
|
||||
{
|
||||
$filesystem = app(Filesystem::class);
|
||||
|
||||
$path = storage_path('app/temp');
|
||||
$path = Storage::path('app/temp');
|
||||
|
||||
foreach ($filesystem->glob("{$path}/*") as $file) {
|
||||
$filesystem->delete($file);
|
||||
|
@ -5,6 +5,7 @@ namespace App\Jobs\Install;
|
||||
use App\Abstracts\Job;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class CopyFiles extends Job
|
||||
{
|
||||
@ -35,7 +36,7 @@ class CopyFiles extends Job
|
||||
throw new \Exception(trans('modules.errors.file_copy', ['module' => $this->alias]));
|
||||
}
|
||||
|
||||
$source = storage_path('app/temp/' . $this->path);
|
||||
$source = Storage::path('app/temp/' . $this->path);
|
||||
|
||||
$destination = $this->getDestination($source);
|
||||
|
||||
|
@ -6,6 +6,7 @@ use App\Abstracts\Job;
|
||||
use App\Traits\SiteApi;
|
||||
use App\Utilities\Info;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class DownloadFile extends Job
|
||||
{
|
||||
@ -47,7 +48,7 @@ class DownloadFile extends Job
|
||||
}
|
||||
|
||||
$path = 'temp-' . md5(mt_rand());
|
||||
$temp_path = storage_path('app/temp/' . $path);
|
||||
$temp_path = Storage::path('app/temp/' . $path);
|
||||
|
||||
$file_path = $temp_path . '/upload.zip';
|
||||
|
||||
|
@ -4,6 +4,7 @@ namespace App\Jobs\Install;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use ZipArchive;
|
||||
|
||||
class UnzipFile extends Job
|
||||
@ -35,7 +36,7 @@ class UnzipFile extends Job
|
||||
throw new \Exception(trans('modules.errors.unzip', ['module' => $this->alias]));
|
||||
}
|
||||
|
||||
$temp_path = storage_path('app/temp/' . $this->path);
|
||||
$temp_path = Storage::path('app/temp/' . $this->path);
|
||||
|
||||
$file = $temp_path . '/upload.zip';
|
||||
|
||||
|
@ -13,6 +13,7 @@ use Egulias\EmailValidator\Validation\MultipleValidationWithAnd;
|
||||
use Egulias\EmailValidator\Validation\RFCValidation;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
trait Documents
|
||||
{
|
||||
@ -187,7 +188,7 @@ trait Documents
|
||||
|
||||
$file_name = $this->getDocumentFileName($document);
|
||||
|
||||
$pdf_path = storage_path('app/temp/' . $file_name);
|
||||
$pdf_path = Storage::path('app/temp/' . $file_name);
|
||||
|
||||
// Save the PDF file into temp folder
|
||||
$pdf->save($pdf_path);
|
||||
|
@ -6,6 +6,7 @@ use App\Events\Banking\TransactionPrinting;
|
||||
use App\Models\Banking\Transaction;
|
||||
use App\Interfaces\Utility\TransactionNumber;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
trait Transactions
|
||||
{
|
||||
@ -161,7 +162,7 @@ trait Transactions
|
||||
|
||||
$file_name = $this->getTransactionFileName($transaction);
|
||||
|
||||
$pdf_path = storage_path('app/temp/' . $file_name);
|
||||
$pdf_path = Storage::path('app/temp/' . $file_name);
|
||||
|
||||
// Save the PDF file into temp folder
|
||||
$pdf->save($pdf_path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user