Laravel: "Could not open imput file: Artisan". What can it be?

Asked

Viewed 157 times

1

I’m learning how to use Laravel and I was downloading Composer. I installed via program, everything ok, but when installing Laravel and testing php Artisan serves, it appears in the image. It seems to be installed but I don’t know what happens, I don’t know much about it and I almost didn’t find similar cases. I use Ampps

inserir a descrição da imagem aqui

  • You have already created the project using laravel new <nome>?

  • C: Users DZ>Laravel new appLaravel Crafting application... In Curlfactory.php line 185: Curl error 7: Failed to connect to localhost port 1080: Connection refused (see http://curl.haxx.se/curl/c/libcu rl-errors.html) new [-dev] [-force] [--] [<name>] Thus?

  • This comment does not help. Please improve your question by adding more details. Please also read the documentation concerning the installation.

  • by the way your project is in the folder appLaravel of the one cd appLaravel (do not know how it is in windows) and then run the php artisan serve

1 answer

1


Requirements for the installation:

  • PHP >= 7.1.3
  • Openssl PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension
  • Ctype PHP Extension
  • JSON PHP Extension
  • Bcmath PHP Extension

1st Step, if you still don’t have php installed on your machine I advise using the laragon it facilitates the development of web applications by installing everything you will need to have a localhost server configured for development.

Step 2, Install Composer you can find here

Step 3, Download the installer Standard with this command

composer global require laravel/installer

Step 4, now you can install the Laravel in any directory of your choice with the command

laravel new nomeDaAplicação

Or

composer create-project --prefer-dist laravel/laravel blog "5.7.*"

Step 5, in the directory where you installed the Laravel with the fourth step, you must run the command php artisan serve Now you can start modifying the files to build your system.

  • 1

    It was all ok until the 4th step, in the 4th step gave this error [Invalidargumentexception] Project directory blog/ is not Empty.

  • is why in the directory /blog there is already a type app cd blog to enter the blog directory through the CMD then type php artisan serve

  • 1

    Warning: require_once(C: Users DZ blog vendor/Composer/autoload_real.php): failed to open stream: No such file or directory in C: Users DZ blog vendor autoload.php on line 5 Fatal error: require_once(): Failed Opening required 'C:Users DZ blog vendor/Composer/autoload_real.php' (include_path='.;C: php Pear') in C: Users DZ blog vendor autoload.php on line 5

  • Even missing vendor dependencies type composer update if this does not work, type composer dump-autoload If it works out, let me know...

  • 1

    Cara worked. Thank you very much. I didn’t know about the blog or Composer update folder. Vlw by vdd :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.