type = $type; $this->scriptFile = ($scriptFile) ? $scriptFile : 'public/js/common/documents.js'; $this->version = $this->getVersion($version); $this->transaction = $transaction; } /** * Get the view / contents that represent the component. * * @return \Illuminate\Contracts\View\View|string */ public function render() { return view('components.transactions.script'); } protected function getVersion($version) { if (!empty($version)) { return $version; } if ($alias = config('type.' . $this->type . '.alias')) { return module_version($alias); } return version('short'); } }