initial commit
This commit is contained in:
26
app/Models/Uploadmedia.php
Normal file
26
app/Models/Uploadmedia.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user