File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -745,11 +745,31 @@ protected function verifyApplicationDoesntExist($directory)
745745 */
746746 protected function generateAppUrl ($ name )
747747 {
748- $ hostname = mb_strtolower ($ name ).'.test ' ;
748+ $ hostname = mb_strtolower ($ name ).'. ' . $ this -> getTld () ;
749749
750750 return $ this ->canResolveHostname ($ hostname ) ? 'http:// ' .$ hostname : 'http://localhost ' ;
751751 }
752752
753+ /**
754+ * Get the TLD for the application.
755+ *
756+ * @return string
757+ */
758+ protected function getTld ()
759+ {
760+ foreach (['herd ' , 'valet ' ] as $ tool ) {
761+ $ process = new Process ([$ tool , 'tld ' ]);
762+
763+ $ process ->run ();
764+
765+ if ($ process ->isSuccessful ()) {
766+ return trim ($ process ->getOutput ());
767+ }
768+ }
769+
770+ return 'test ' ;
771+ }
772+
753773 /**
754774 * Determine whether the given hostname is resolvable.
755775 *
You can’t perform that action at this time.
0 commit comments