fix form create update postcheck and precheck

This commit is contained in:
2025-09-19 20:44:28 +07:00
parent cab0d2e9a8
commit db4c586535
22 changed files with 4977 additions and 224 deletions

View File

@@ -75,7 +75,7 @@ class Postcheck extends Model
*/
public function getFrontImageUrlAttribute()
{
return $this->front_image ? Storage::disk('public')->url($this->front_image) : null;
return $this->front_image ? asset('storage/' . ltrim($this->front_image, '/')) : null;
}
/**
@@ -83,7 +83,7 @@ class Postcheck extends Model
*/
public function getCabinTemperatureImageUrlAttribute()
{
return $this->cabin_temperature_image ? Storage::disk('public')->url($this->cabin_temperature_image) : null;
return $this->cabin_temperature_image ? asset('storage/' . ltrim($this->cabin_temperature_image, '/')) : null;
}
/**
@@ -91,7 +91,7 @@ class Postcheck extends Model
*/
public function getAcImageUrlAttribute()
{
return $this->ac_image ? Storage::disk('public')->url($this->ac_image) : null;
return $this->ac_image ? asset('storage/' . ltrim($this->ac_image, '/')) : null;
}
/**
@@ -99,7 +99,7 @@ class Postcheck extends Model
*/
public function getBlowerImageUrlAttribute()
{
return $this->blower_image ? Storage::disk('public')->url($this->blower_image) : null;
return $this->blower_image ? asset('storage/' . ltrim($this->blower_image, '/')) : null;
}
/**
@@ -107,7 +107,7 @@ class Postcheck extends Model
*/
public function getEvaporatorImageUrlAttribute()
{
return $this->evaporator_image ? Storage::disk('public')->url($this->evaporator_image) : null;
return $this->evaporator_image ? asset('storage/' . ltrim($this->evaporator_image, '/')) : null;
}
/**

View File

@@ -75,7 +75,7 @@ class Precheck extends Model
*/
public function getFrontImageUrlAttribute()
{
return $this->front_image ? Storage::disk('public')->url($this->front_image) : null;
return $this->front_image ? asset('storage/' . ltrim($this->front_image, '/')) : null;
}
/**
@@ -83,7 +83,7 @@ class Precheck extends Model
*/
public function getCabinTemperatureImageUrlAttribute()
{
return $this->cabin_temperature_image ? Storage::disk('public')->url($this->cabin_temperature_image) : null;
return $this->cabin_temperature_image ? asset('storage/' . ltrim($this->cabin_temperature_image, '/')) : null;
}
/**
@@ -91,7 +91,7 @@ class Precheck extends Model
*/
public function getAcImageUrlAttribute()
{
return $this->ac_image ? Storage::disk('public')->url($this->ac_image) : null;
return $this->ac_image ? asset('storage/' . ltrim($this->ac_image, '/')) : null;
}
/**
@@ -99,7 +99,7 @@ class Precheck extends Model
*/
public function getBlowerImageUrlAttribute()
{
return $this->blower_image ? Storage::disk('public')->url($this->blower_image) : null;
return $this->blower_image ? asset('storage/' . ltrim($this->blower_image, '/')) : null;
}
/**
@@ -107,7 +107,7 @@ class Precheck extends Model
*/
public function getEvaporatorImageUrlAttribute()
{
return $this->evaporator_image ? Storage::disk('public')->url($this->evaporator_image) : null;
return $this->evaporator_image ? asset('storage/' . ltrim($this->evaporator_image, '/')) : null;
}
/**