category qosishsh to'g'irlandi
This commit is contained in:
@@ -58,6 +58,10 @@ class Screen extends Model
|
||||
public function getPath(): string
|
||||
{
|
||||
if (!empty($this->path)) {
|
||||
if (str_starts_with($this->path, 'uploads/') && file_exists(public_path($this->path))) {
|
||||
return asset($this->path);
|
||||
}
|
||||
|
||||
return Storage::url($this->path);
|
||||
}
|
||||
|
||||
@@ -70,6 +74,10 @@ class Screen extends Model
|
||||
public function getPathThumb(): string
|
||||
{
|
||||
if (!empty($this->path_thumb)) {
|
||||
if (str_starts_with($this->path_thumb, 'uploads/') && file_exists(public_path($this->path_thumb))) {
|
||||
return asset($this->path_thumb);
|
||||
}
|
||||
|
||||
return Storage::url($this->path_thumb);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user