showWhenPeeking = $callback; return $this; } /** * Determine if the field is to be shown in the preview modal. * * @param \Laravel\Nova\Http\Requests\NovaRequest $request * @return bool */ public function isShownWhenPeeking(NovaRequest $request): bool { if (is_callable($this->showWhenPeeking)) { $this->showWhenPeeking = call_user_func($this->showWhenPeeking, $request); } return $this->showWhenPeeking; } }