You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
390 B
22 lines
390 B
<?php
|
|
namespace App\Models;
|
|
|
|
class Blacklist extends SoftDeletesModel
|
|
{
|
|
protected $guarded = ['id'];
|
|
|
|
protected $appends = ['file_detail'];
|
|
|
|
protected $casts = [
|
|
'file'=>'json'
|
|
];
|
|
|
|
public function getFileDetailAttribute()
|
|
{
|
|
if (empty($this->file)) {
|
|
return [];
|
|
}
|
|
return Upload::whereIn('id', $this->file)->get();
|
|
}
|
|
}
|