You have just installed laravel in Xampp or Wamp. I will use Xampp to illustrate. You need to view the Xampp installation without firing up the server on cmd that is, >>php artisan serve.
To view the Laravel installation on the browser using Xampp server you would normally have to type localhost/examplelaravel/public in most cases you don’t want to type ‘public’ all the time. In this short post I will show you how to get it to localhost/examplelaravel. You will be able to view your site without the public in the url
- Go into the laravel files folder then into public. Eg if you installed laravel in examplelaravel, you should go into the folder examplelaravel/public then locate index.php and copy the file to the root of your site laravel files, ie paste it in examplelaravel.
- Then open examplelaravel /index.php in an editor of your choice.
- Go to line 21 and change it to as follows
- Go to line 35 and change it to as follows
$app = require_once __DIR__.'/bootstrap/start.php';
- You should now be able to visit localhost/examplelaravel and your site will load.
Needless to say, this tutorial is intended for use in your development environment just to make your work easier if you prefer to use Xampp or Wamp.
Latest posts by Ricky Wahowa (see all)
- 24 CSS Selectors – Combination Selectors , Multiple Selectors - March 21, 2017
- 23 CSS Selectors – PSEUDO Selectors - March 20, 2017
- 22 CSS Selectors – Attribute Selectors - March 17, 2017