display)) { return call_user_func($this->display, $resource); } return $resource->title(); } /** * Set the column that should be displayed for the field. * * @param (\Closure(mixed):(string))|string $display * @return $this */ public function display($display) { $this->display = $display instanceof Closure ? $display : function ($resource) use ($display) { return $resource->{$display}; }; return $this; } }