1

I have valet working in the sense that I can ping .test domains and I even have a dummy index.php hello world in a "test" folder in the "builds" folder.

(I'd like to keep my sites in the "builds" folder)

I thought it was as simple as cd into the "builds" directory and then the command I thought was as simple as laravel new blog with 'blog' the name of the directory that would be created to house the new laravel install.

This is the error I get:

laravel new blog
-bash: laravel: command not found

If I run a composer command it shows that it IS accessible, i.e. I get the Composer logo etc.

What is it that is being done wrong?

Any idea how to problem solve this?

++++

composer global show

And here's the outcome:

Changed current directory to /Users/henry/.composer
doctrine/inflector            v1.3.0  Common String Manipulations with rega...
illuminate/container          v6.0.2  The Illuminate Container package.
illuminate/contracts          v6.0.2  The Illuminate Contracts package.
illuminate/support            v6.0.2  The Illuminate Support package.
laravel/valet                 v2.4.2  A more enjoyable local development ex...
mnapoli/silly                 1.7.1   Silly CLI micro-framework based on Sy...
nategood/httpful              0.2.20  A Readable, Chainable, REST friendly,...
nesbot/carbon                 2.24.0  A API extension for DateTime that sup...
php-di/invoker                2.0.0   Generic and extensible callable invoker
psr/container                 1.0.0   Common Container Interface (PHP FIG P...
psr/simple-cache              1.0.1   Common interfaces for simple caching
symfony/console               v4.3.4  Symfony Console Component
symfony/polyfill-mbstring     v1.12.0 Symfony polyfill for the Mbstring ext...
symfony/polyfill-php72        v1.12.0 Symfony polyfill backporting some PHP...
symfony/polyfill-php73        v1.12.0 Symfony polyfill backporting some PHP...
symfony/process               v4.3.4  Symfony Process Component
symfony/service-contracts     v1.1.6  Generic abstractions related to writi...
symfony/translation           v4.3.4  Symfony Translation Component
symfony/translation-contracts v1.1.6  Generic abstractions related to trans...
symfony/var-dumper            v4.3.4  Symfony mechanism for exploring and d...
tightenco/collect             v6.0.2  Collect - Illuminate Collections as a...

So, it appears I don't have it?

******** Does my bash profile have to be in the same directory? I think that might be the error...

Henry
  • 5,195
  • 7
  • 21
  • 34
  • Have you installed the `laravel/installer` package? – Nitish Kumar Sep 17 '19 at 04:32
  • is there a way I can test? laravel -v doesn't work – Henry Sep 17 '19 at 04:33
  • `composer global show` this link can be helpful https://stackoverflow.com/questions/15185459/how-to-get-list-of-all-installed-packages-along-with-version-in-composer – Nitish Kumar Sep 17 '19 at 04:35
  • Thanks - I pasted the results in my above question. So, it appears that Laravel is not installed? How can I make that global or do I add that to my "park" directory in Valet? Thanks! – Henry Sep 17 '19 at 04:38

1 Answers1

0

First, download the Laravel installer using Composer:

composer global require laravel/installer

Make sure to place Composer's system-wide vendor bin directory in your $PATH so the laravel executable can be located by your system. This directory exists in different locations based on your operating system; however, some common locations include:

macOS and GNU / Linux Distributions: $HOME/.config/composer/vendor/bin

Then you'll be able to execute laravel new blog

Nitish Kumar
  • 6,054
  • 21
  • 82
  • 148
  • Thanks that seemed to work but now I get this error: Crafting application... PHP Warning: file_put_contents(/builds/laravel_xxx.zip): failed to open stream: Permission denied in.." – Henry Sep 17 '19 at 04:45
  • I need to make the diretory writeable? – Henry Sep 17 '19 at 04:46
  • Yes, or use sudo before. – Nitish Kumar Sep 17 '19 at 04:46
  • Yes that seems to be working...you think maybe I installed valet in a system directory or something? (Thanks for your help btw) – Henry Sep 17 '19 at 04:48
  • I'm not sure, will have to see the complete configs. I guess that might be the issue. – Nitish Kumar Sep 17 '19 at 04:49
  • @nitesh Kumar > https://stackoverflow.com/questions/57967577/permission-based-issue-with-valet-so-it-seems that's the follow up - would REALLY appreciate any thoughts you might have there... – Henry Sep 17 '19 at 04:57