Update
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class TrackingContentSelection extends Model
|
||||
{
|
||||
@@ -41,11 +40,11 @@ public function content()
|
||||
if ($this->content_type === 'meme') {
|
||||
return $this->belongsTo(MemeMedia::class, 'content_id');
|
||||
}
|
||||
|
||||
|
||||
if ($this->content_type === 'background') {
|
||||
return $this->belongsTo(BackgroundMedia::class, 'content_id');
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user