id = 'tooltip-disable-' . mt_rand(1, time()); $this->position = $position; $this->icon = $icon; $this->iconType = $iconType; $this->disableText = $this->getDisableText($text, $disableText); } /** * Get the view / contents that represent the component. * * @return \Illuminate\Contracts\View\View|string */ public function render() { return view('components.index.disable'); } protected function getDisableText($text, $disableText) { if (! empty($disableText)) { return $disableText; } return trans('general.disabled_type', ['type' => Str::lower($text)]); } }