storage url o'zgartirildi

This commit is contained in:
2026-04-28 16:00:18 +05:00
parent bb733d14c1
commit 0bf99a5e26
13 changed files with 80 additions and 30 deletions

View File

@@ -2,9 +2,9 @@
namespace App\Http\Requests\Dashboard\Product;
use App\Support\Uploads;
use Carbon\Carbon;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Storage;
use App\Api\ImageResize;
class Store extends FormRequest
@@ -71,7 +71,7 @@ class Store extends FormRequest
{
$folder = "uploads/posters/" . Carbon::now()->format('Y/m/d');
return (string) $this->file('poster')->store($folder);
return Uploads::store($this->file('poster'), $folder);
}
/**
@@ -81,7 +81,7 @@ class Store extends FormRequest
{
if ($this->hasFile('calc')) {
$folder = "uploads/calc/" . Carbon::now()->format('Y/m/d');
return (string) $this->file('calc')->store($folder);
return Uploads::store($this->file('calc'), $folder);
}
return null;
}
@@ -90,7 +90,7 @@ class Store extends FormRequest
{
if ($this->hasFile('data_sheet')) {
$folder = "uploads/datasheet/" . Carbon::now()->format('Y/m/d');
return (string) $this->file('data_sheet')->store($folder);
return Uploads::store($this->file('data_sheet'), $folder);
}
return null;
@@ -102,7 +102,7 @@ class Store extends FormRequest
public function getPosterThumb()
{
$image = $this->file('poster');
$tempPath = $image->store('temp', 'public');
$tempPath = Uploads::store($image, 'temp', 'public');
$resizer = new ImageResize();
return $resizer->resize($tempPath, 322, 'posters', true);