Could not open input file: artisan

后端 未结 27 1163
清歌不尽
清歌不尽 2020-11-30 17:45

When trying to create a new laravel project, The following error appears on the CLI:

Could not open input file: artisan

Script php artisan clear-c

27条回答
  •  余生分开走
    2020-11-30 18:13

    First, be sure to be in the laravel project folder or else the terminal won't be able to locate the artisan file in the project directory and any subsequent request you pulled to start a server would be rejected.

    Demo

    Let's say our laravel project name is blog and located in C:\laravel We then have: C:\laravel\blog

    Where to open terminal

    Navigate to the C:\laravel\blog directory and open the command window (terminal). Input the code below:

    Laravel terminal code to start server

    php artisan serve --host 127.0.0.1

提交回复
热议问题