用户配置转移
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Traits\BelongsToUser;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
@@ -11,16 +12,12 @@ use Illuminate\Support\Str;
|
||||
class Dynamic extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
use BelongsToUser;
|
||||
|
||||
protected $casts = [
|
||||
'pictures' => 'json',
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function getPicturesUrlAttribute(): array
|
||||
{
|
||||
$pictures = $this->getAttribute('pictures');
|
||||
|
||||
Reference in New Issue
Block a user