name; } /** * @return string */ private function getTitle(): string { return Str::ucfirst($this->title); } /** * @return array */ private function getValue(): Collection { $value = old($this->getRequestName(), $this->value); return collect($value); } /** * @return Role */ private function getRole(): Role { return $this->role; } public function render(): View { return view('private.components.forms.permissions_for_role', [ 'title' => $this->getTitle(), 'name' => $this->getName(), 'requestName' => $this->getRequestName(), 'permissions' => Permission::cases(), 'role' => $this->getRole(), 'value' => $this->getValue(), ]); } }