/** * Show the form for creating a new resource. * * @return Response */ public function create() { $domainId = SiteConfig::whereParameter('domainId')->first()->data; // Get all active zones, packages and templates $zones = Zone::whereStatus('Enabled')->get(); $packages = Package::all(); $templates = TemplateGroup::all(); $myTemplates = $this->acs->listTemplates(['account' => Auth::User()->email, 'domainid' => $domainId, 'templatefilter' => 'self']); $diskTypes = DiskType::all(); $sshKeys = $this->acs->listSSHKeyPairs(['account' => Auth::User()->email, 'domainid' => $domainId]); $secGroups = $this->acs->listSecurityGroups(['account' => Auth::User()->email, 'domainid' => $domainId]); return view('instance.create')->with(compact('zones', 'packages', 'templates', 'myTemplates', 'diskTypes', 'sshKeys', 'secGroups')); }