| 123456789101112131415161718192021222324252627 | 
							- <?php
 - 
 - namespace App\Models;
 - 
 - use Illuminate\Database\Eloquent\Casts\Attribute;
 - use Illuminate\Database\Eloquent\Model;
 - use Illuminate\Support\Facades\Storage;
 - use Spatie\Translatable\HasTranslations;
 - 
 - class ProfilePart extends Model
 - {
 -     use HasTranslations;
 -     protected $guarded  = ["id"];
 -     public $translatable = ['title', 'content', 'img_alt'];
 - 
 -     public $appends = [
 -         "img_url_link"
 -     ];
 - 
 -     protected function imgUrlLink(): Attribute
 -     {
 -         return Attribute::make(
 -             get: fn ($value) => is_null($this->ing_url) ? null :Storage::url($this->ing_url),
 -         );
 -     }
 - }
 
 
  |