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)
745
745
*/
746
746
protected function generateAppUrl ($ name )
747
747
{
748
- $ hostname = mb_strtolower ($ name ).'.test ' ;
748
+ $ hostname = mb_strtolower ($ name ).'. ' . $ this -> getTld () ;
749
749
750
750
return $ this ->canResolveHostname ($ hostname ) ? 'http:// ' .$ hostname : 'http://localhost ' ;
751
751
}
752
752
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
+
753
773
/**
754
774
* Determine whether the given hostname is resolvable.
755
775
*
You can’t perform that action at this time.
0 commit comments