*/ protected $fillable = [ 'user_id', 'session_id', 'ip_address', 'user_agent', 'consents', 'accepted_at', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'consents' => 'array', 'accepted_at' => 'datetime', ]; } /** * Get the user that owns the cookie consent. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\User, \App\Models\CookieConsent> */ public function user(): BelongsTo { return $this->belongsTo(User::class); } }