<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Badge extends Model
{
    use SoftDeletes;
    
    protected $fillable = ['name', 'name_ar', 'type', 'status','icon','description','description_ar'];

    public function getIconAttribute($icon){

        return get_uploaded_image_url( $icon, 'badge_image_upload_dir', 'camera_placeholder.png' );
        
    }

}
