test
This commit is contained in:
@@ -237,7 +237,10 @@ class Product extends Model
|
||||
{
|
||||
if (!empty($this->poster)) {
|
||||
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
||||
return Storage::url($this->poster);
|
||||
return Storage::temporaryUrl(
|
||||
$this->poster,
|
||||
Date::now()->addMinutes(5)
|
||||
);
|
||||
}
|
||||
return config('app.url') . '/' . $this->poster;
|
||||
}
|
||||
@@ -249,7 +252,10 @@ class Product extends Model
|
||||
{
|
||||
if (!empty($this->data_sheet) and ($this->data_sheet != null and $this->data_sheet != "null")) {
|
||||
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
||||
return Storage::url($this->data_sheet);
|
||||
return Storage::temporaryUrl(
|
||||
$this->data_sheet,
|
||||
Date::now()->addMinutes(5)
|
||||
);
|
||||
}
|
||||
return config('app.url') . '/' . $this->data_sheet;
|
||||
}
|
||||
@@ -260,7 +266,10 @@ class Product extends Model
|
||||
{
|
||||
if (!empty($this->poster_thumb)) {
|
||||
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
||||
return Storage::url($this->poster_thumb);
|
||||
return Storage::temporaryUrl(
|
||||
$this->poster_thumb,
|
||||
Date::now()->addMinutes(5)
|
||||
);
|
||||
}
|
||||
return config('app.url') . '/' . $this->poster_thumb;
|
||||
}
|
||||
@@ -299,10 +308,10 @@ class Product extends Model
|
||||
$when = $beginning ? 1 : 0;
|
||||
|
||||
if ($rate == 0) {
|
||||
return - ($future_value + $present_value) / $periods;
|
||||
return -($future_value + $present_value) / $periods;
|
||||
}
|
||||
|
||||
return - ($future_value + ($present_value * pow(1 + $rate, $periods)))
|
||||
return -($future_value + ($present_value * pow(1 + $rate, $periods)))
|
||||
/
|
||||
((1 + $rate * $when) / $rate * (pow(1 + $rate, $periods) - 1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user