Skip to content

Installation on Windows

Stefan Heyder edited this page May 9, 2017 · 9 revisions

Requirements

  • MySQL Database

  • Apache Server

  • PHP >= 5.6.4

  • OpenSSL PHP Extension

  • PDO PHP Extension

  • Mbstring PHP Extension

  • Tokenizer PHP Extension

  • XML PHP Extension

  • Composer

  • Laravel Framework is already included in this repository.

Installation on XAMPP on Windows

"$>" stands for console commands (Start --> run --> cmd)

  1. Install XAMPP - https://www.apachefriends.org/index.html

  2. Install Composer - https://getcomposer.org/Composer-Setup.exe

  3. Install git - https://windows.github.com/

  4. Copy all files from ILSCeV/Lara to C:/xampp/htdocs/Lara, e.g. using GitHub For Windows - clone ILSCeV/Lara

  5. Open project directory in the console - $> cd c:/xampp/htdocs/Lara and update dependencies - $> composer update (this one can take some time - don't worry, make some tea)

  6. In the Apache Server config (httpd.conf) change DocumentRoot "C:/xampp/htdocs to DocumentRoot "C:/xampp/htdocs/Lara/public" to hide "Lara/public" path.

  7. Start both the server and the database, e.g. from XAMPP Control Panel

  8. Rename the file .env.example located in /var/www/Lara/ into .env and edit environment variables:

    • set "APP_ENV=production" (or e.g. "development" depending on your context)
      • For development purposes a workaround is built into the LoginController which assigns a random dummy-user at each login event, ignoring login/password input from user. It's activated if the "APP_ENV"-variable is set to "development".
    • set "APP_DEBUG=false" (or "true" for development)
    • set a new application key with php artisan key:generate
    • set "DB_HOST", "DB_DATABASE", "DB_USERNAME" and "DB_PASSWORD" to your database credentials
  9. Create a new MySQL database named "lara" in XAMPP (e.g. by using http://127.0.0.1/phpmyadmin ) and update database schema - $> php artisan migrate --seed

    • (Skip this step if you are using an existing production DB or you will overwrite the data.)
  10. For development only: install Node(https://nodejs.org/en/) then run (in the lara-vedst directory):

    • $> npm install
    • $> npm run dev
    • This will install typescript and gulp and running gulp will compile the typescript sources to the app.$HASH$.js file in /public/js/. Note that installing all dependencies may take a while but you can already proceed with the next steps.
  11. All changes that you make to typescript/javascript files will require you to run npm run dev once again, buildingt the files from resources/* to public/js.

  12. Run this once: $> php artisan config:cache