SystemTag.php 597 Bytes
<?php

namespace App\Models;

use App\Support\Model;
use Awobaz\Compoships\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;

class SystemTag extends Model
{
    use SoftDeletes;

    protected $table = 'system_tags';

    protected $hidden = ['deleted_at', 'pivot'];

    protected $guarded = [];

    protected $casts = [
        'expand' => 'object'
    ];

    /**
     * @return \Awobaz\Compoships\Database\Eloquent\Relations\BelongsTo
     */
    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class)->withTrashed();
    }
}