macos valet install

image
brew install php
brew install mysql@5.7
brew services start mysql@5.7

https://gist.github.com/brandonsimpson/5204ce8a46f7a20071b5
https://dev.mysql.com/downloads/mysql/

Install Composer

php -r “copy(‘https://getcomposer.org/installer’, ‘composer-setup.php’);”
php -r “if (hash_file(‘sha384’, ‘composer-setup.php’) === ‘e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a’) { echo ‘Installer verified’; } else { echo ‘Installer corrupt’; unlink(‘composer-setup.php’); } echo PHP_EOL;”
php composer-setup.php
php -r “unlink(‘composer-setup.php’);”




After the command, you will have composer.phar file in the current directory and the composer command is available as:

php composer.phar [composer commnad]

In order to make composer available globally, you have to move the recently downloaded composer.phar to local user’s bin folder using bellow command:

mv composer.phar /usr/local/bin/composer

Now, you can access the composer from the terminal simply using the composer command. Thats it.

Install Valet

composer global require laravel/valet

If you have a problem with the “Changed current directory to”. You need to add this folder to your unix path. You can do this by running the following:

PATH=$PATH:~/.composer/vendor/bin

Run the bellow command. This will configure and install Valet and DnsMasq, and register Valet’s daemon to launch when your system starts.

Valet Problems ?? 

where php path ?


php –ini

İS PROBLEM ??

In Nginx.php line 121:

 Nginx cannot start; please check your nginx.conf [1: sudo: nginx: command not found 

FIXED 

valet uninstall 

brew uninstall nginx
brew remove nginx
rm -f -R /usr/local/nginx
rm -f /usr/local/sbin/nginx
rm -r /usr/local/var/run/nginx
rm -f -R /usr/local/etc/nginx  
rm -r /usr/local/opt/nginx

rm -f -R /usr/local/etc/nginx  


open -e nginx.conf

where is nginx path ? 

https://gist.github.com/jimothyGator/5436538