Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Laravel application on localhost?

Tags:

css

php

laravel

I'm new to Laravel framework. I have installed and developed a small application. I've got source code from Github for an application which I want to integrate and run on my localhost. Please guide me any link or material where I get proper instructions to start working on this website. Give me details about which file to be edited so that atleast I can access on my localhost.

Github link : https://github.com/fakharkhan/laravel-school-erp

like image 903
rashmi sm Avatar asked Dec 05 '25 09:12

rashmi sm


2 Answers

If you don't want to use homestead (which is somewhat complex for beginners to setup) follow this:

steps to setup laravel app from github repo

  1. first of all you need to install git and composer.
  2. open command prompt (terminal) in your document root folder.
  3. clone the repository by executing git clone https://github.com/fakharkhan/laravel-school-erp.git
  4. change directory in terminal to newly cloned project by using cd laravel-school-erp in your case.
  5. run composer install to install project dependencies.
  6. rename .env.example to .env file.
  7. open .env file and enter the database connection information.
  8. run laravel migrations (import database) by executing php artisan migrate from terminal.
  9. visit the url by adding /public to it.

Optional

Setup virtual host by editing httpd-vhosts.conf file (so you can avoid typing /public in the url) and adding following to it

<VirtualHost example.dev:80>
    DocumentRoot "C:/xampp/htdocs/laravel/public"
    ServerName example.dev
</VirtualHost>

then edit your host file and add following to it:

127.0.0.1 example.dev

You can replace example.dev with whatever URL you like.

like image 153
Maulik Avatar answered Dec 07 '25 23:12

Maulik


You can use Laravel Homestead

https://laravel.com/docs/5.4/homestead

Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on your local machine.

like image 36
parpar Avatar answered Dec 07 '25 22:12

parpar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!