<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;

class Uploadmedia extends BaseModel
{
    use HasFactory;

    protected $table = 'uploadmedias';
    protected $guarded = [];

    public function getUploadMediaByUserId($user_id){
        return $this->where([['user_id' ,'=', $user_id] , ['image_type_id','!=', 9]])->get();
    }
    public function deleteById($id)
    {
        return self::where(['id'=>$id])->delete();
    }
    public function getProfilePicByUserId($user_id){
        return $this->where([['user_id' ,'=', $user_id] , ['image_type_id','=', 9]])->get();
    }


}
