Error trying install laravel (valet command not found) - laravel

I am currently trying to install laravel, and following this tutorial :
I already installed brew, composer and php, but when I try to install valet I get the following error : valet: command not found.
I already changed my path (twice, I think), because when I echo path I get:
c/Users/Tiago/AppData/Roaming/Composer/vendor/bin:/snap/bin:/home/tiago/.composer/vendor/bin
What am I doing wrong?

Valet is for MacOS, seems like you are using windows.
Use Laravel Homestead instead.

Related

Laravel Installation On Windows by using Composer

I am trying to setup Laravel using Composer through my command prompt but I am getting some errors.
I have already installed Composer and Xampp(php/mysql/apache) but I am still unable to install it. I have followed the exact instructions provide by the Laravel and followed other resources but I am still getting error.

How to install composer globally for laravel app in windows?

I have a question related to composer and laravel. My question is whenever I install the fresh laravel app using command :
composer create-project laravel/laravel blog
Inside my C://xampp/htdocs/ directory and then change path to C://xampp/htdocs/blog/, here I am unable to run the composer command but I had already installed composer from its official website globally in C://xampp/htdocs/ directory. So is there any way to use composer command globally whenever I install fresh laravel app, so that I don't want to install composer in the laravel app directory everytime.
Now I guess they provide direct setting up global installation,
Check here
I did it like this a lot earlier,
Change to the path (or you can add that directory to your path later), and run the installer as mentioned on composer download site to download composer.phar.
Create a new composer.bat file alongside composer.phar.
Using cmd.exe:
run
echo #php "%~dp0composer.phar" %*>composer.bat
Then set it to path environment variable(see this)
Test with a new terminal:
composer -V
Will return
Composer version 1.10.6 2020-05-06 10:28:10
go to composer website and download the exe file, you should have it gloablly if you install it that way.
Good luck ^_^

creating new laravel application on mac by laravel installer

I have been strugling to create an application with laravel installer from terminal.
I have globally installed composer and laravel..
however i constantly get this error:
If you check at the bottom of the screenshot you can see -bash: new: command not found however laravel command is being executed perfectly. My osx version is 10.10.2. Macbook pro.
Any help will be appreciated.
Another question (bit out of the topic)
Is git inbuild in mac osx?
Cuz i hadn't installed it but it shows all of its commands.
Regards,
=======================
I created alias for composer and laravel in .bash_profile and .bashrc and it worked however now I'm getting this error :
Prajwols-MacBook-Pro:htdocs prajwol$ laravel new test
Crafting application...
Warning: ZipArchive::extractTo(): Invalid or unitialized Zip object in /Users/prajwol/.composer/vendor/laravel/installer/src/NewCommand.php on line 99
Warning: ZipArchive::close(): Invalid or unitialized Zip object in /Users/prajwol/.composer/vendor/laravel/installer/src/NewCommand.php on line 101
Application ready! Build something amazing.
Result : An empty folder is created called test in destination folder.
The command needs a project name: laravel new <NAME>. Like laravel new blog. This will create a new laravel project in a new blog directory in the current path.
$ brew tap homebrew/homebrew-php
$ brew install php72
Install composer
$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ php composer-setup.php --install-dir=/usr/local/bin --filename=composer
Install Laravel
$ composer global require "laravel/installer"
$ composer global -vvv require "laravel/installer"
now run command
composer

Laravel upgrade to 4.2 - mcrypt extension required

I have problems when trying to update laravel 4.1 to 4.2.
I started that project on ubuntu, then got a new macbook pro and it looks like I'm missing something.
I'm using XAMPP 1.8.3
When I
composer update
I get the following error
Mcrypt PHP extension required.
Script php artisan clear-compiled handling the post-update-cmd event returned with an error
After few googling, found homebrew, then it's easy
brew install mcrypt
but I get the following warning
Warning: mcrypt-2.6.8 already installed
Any ideas?
Assuming your macbook pro is running Mavericks, the problem is most likely in your $PATH variable. The php command defaults to the built in php that ships with your mac. You can verify this by entering in terminal echo $PATH;
If it points to /usr/bin:/bin/usr/bin:/usr/local/bin then the problem is here because the native mac php does not include mcrypt. Add your XAMP PHP to your paths variable should solve the problem,
export PATH=$PATH:\path\to\xamp\bin\php5.ver\bin

Unable to Install Laravel 4.1 on Maverics OS X

I am trying to install laravel 4.1 on Maverics OS X using the document provided on the laravel site.
I am trying only two methods provided: via laravel installer & via composer. The third option is not preferred because I will only be able to apply these two methods on my production server.
I get following errors
a) Using via laravel Installer: I issue following commands (assuming I have downloaded in downloads dir)
downloads$ mv laravel.phar /usr/local/bin
cd ~/rohinigeeks
rohinigeeks$ sudo laravel rohinigeeks
ERROR:
sudo: laravel: command not found
b) Using Via Composer. I issue following commands
composer create-project laravel/laravel rohinigeeks --prefer-dist
ERROR:
[ErrorException]
unlink(/Users/apple/.composer/cache/files/symfony/security/ef511d47c94ad92e
37112b43efcbf7da8696a803.zip): Permission denied
Your help will be appreciated.
-AK
You installed laravel.phar in /usr/local/bin, so use that as the command name. Or rename it to /usr/local/bin/laravel:
mv laravel.phar /usr/local/bin/laravel
Also make sure it's executable:
chmod a+x /usr/local/bin/laravel
And if you're using tcsh (is this still the OSX default?), make sure to use rehash.

Resources