textSize = $this->getTextSize($textSize); } /** * Get the view / contents that represent the component. * * @return \Illuminate\Contracts\View\View|string */ public function render() { return view('components.title'); } protected function getTextSize($textSize) { switch ($textSize) { case 'short': $textSize = '15'; break; default: $textSize = '25'; break; } return $textSize; } }