File manager - Edit - /var/www/html/gop/api/app/Models/Image.php
Back
<?php namespace App\Models; use Illuminate\Database\Eloquent\Casts\Attribute; use Illuminate\Support\Facades\Storage; class Image extends BaseModel { protected $fillable = [ 'name', 'path', 'description', 'imageable_id', 'imageable_type', ]; protected $appends = [ 'storage_path', ]; protected function storagePath(): Attribute { return new Attribute( get: fn () => Storage::url($this->path), ); } public function imageable() { return $this->morphTo(); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings