0

Is php artisan serve command working in command line for laravel?

Step 1:

C:\Users\Rezaul> php artisan serve
   Could not open input file: artisan

C:\Users\Rezaul>


Step 2:

C:\Users\Rezaul>php artisan serve --port=8080
   Could not open input file: artisan

C:\Users\Rezaul>

http://localhost:8000

Siyavash Hamdi
  • 2,764
  • 2
  • 21
  • 32
Rezaul Karim
  • 7
  • 1
  • 3

3 Answers3

0

On windows you might have to give it the full path try running php .\artisan serve

Ken
  • 2,654
  • 3
  • 26
  • 29
0

You should run php artisan serve command in You app directory like this :

C:\Users\Rezaul\project>php artisan serve

which project folder struct is like this :

->project\
---->app\
---->config\
---->public\
   .
   .
   .
----->artisan
----->composer.json
Omid Reza Heidari
  • 658
  • 12
  • 27
0

Could not open input file: artisan

This error message indicates that there are no file artisan in your current directory C:\Users\Rezaul>.

You should run the command in your Laravel project directory.

You should cd into your project directory, or right click(or with shift) in the file explorer of your project and click open cmd(or powershell) here, then run the command php artisan serve.

Cloud Soh Jun Fu
  • 1,456
  • 9
  • 12