Thursday, April 21, 2022

Install and Run Laravel - Composer and Xampp

Make sure you already have Xampp installed.

Install Composer

  • Can go to >1< or >2< to download a Composer for Windows.
  • Install the composer.setup. Click Next and it will automatically detect your PHP file. Click Next, then Install.

  • Click Finish and that's about it.

Setting Up with Command Prompt

  • Open cmd, type in cd c:/
  • Type, composer global require laravel/installer 
  • Type, cd C:\xampp\htdocs
  • Then, composer create-project --prefer-dist laravel/laravel app(you can change this).
  • Wait until it is done and successful. After that, type in cls.
  • Try typing in, php artisan serve. It could not open input file because we are not in the right directory.
  • Now head into the folder that you've created by typing, cd app
  • Now type in, php artisan serve
  • Next, open your browser and type in 127.0.0.1:8000(port number given) and a Laravel page will show.

*Note that every time you want to do this after you type in 'php artisan serve', a new port number will show up. So, use it to open Laravel.

Done!

No comments:

Post a Comment

Komen atau sebarang pertanyaan di sini :)

WordPress #3 | How to Change Website URL

Hi. Today we're gonna look at how to change your website URL in case you messed up. In this case, yes, I messed up. That is why this pos...