Skip to content

1. Installation Instructions

Andrew Hanichkovsky edited this page Feb 15, 2018 · 4 revisions

First time setup :

Laragon wamp stack

  1. Install Laragon WAMP
  2. Run PHPStorm / IDEA and create a new project from Github in your laragon's documents root folder. (Typically located in {path to laragon}/www/)
  3. Laragon should now list your new project. Open the control panel and hit start all.
  4. Open Laragon and click Terminal, navigate to your project root and type composer install
  5. Run yarn once and follow it up with yarn install

You can continue setting up while it fetches all our dependencies for you.

Apache config

Since you're pulling this repo, laragon's automagic setup will be be slightly wrong. To fix it :

  1. Open Laragon's Menu
  2. Navigate to Apache > sites-enabled > auto.soen341.oo.conf
  3. If it's not already there, append public/ to every instance of the directory path, i.e when you seen .../SOEN341/<add here>
  4. You may need to restart the apache service for things to update.

.env file

Pretty straight forward but nothing will work unless you do this.

  • Copy the .env.example file and call it .env
  • run php artisan key:generate
  • you can also do this from within PHPStorm

MySQL DB setup

Again, you're pulling a repo so laragon won't automatically create a database for you. Lets do it manually :

  1. Open HeidiSQL from laragon's menu
  2. Login with root and your password (empty by default)
  3. Create a new database and name it SOEN341 (you can leave the collation as is but utf8 is preferred)
  4. Switch to a terminal and run php artisan migrate in your project root

General PHPStorm Setup :

Obviously you need PHPStorm, you can get it for free here --> thanks uni

Plugins

PHPStorm helps you as much as it can but it needs to know what it's reading for auto-complete to work.

The base PHPStorm install comes with apparently everything except these plugins :

  • Laravel Plugin
  • LaravelStorm

To install them : open Settings (CTRL + ALT + S) > Plugins > Click browse repositories, search for each then install.

Add a PHP interpreter (php-cli)

  1. Open File > Settings (CTRL + ALT + S) -> Languages & Frameworks > PHP
  2. Change language level to appropriate version. (We're using 7.2)
  3. Click the ... next to CLI interpreter and hit the + to add a new one, name it as you wish.
  4. The path to the php executable is as follows {LARAGON_INSTALL}\bin\php\{some_php_version_here}\php.exe
  5. Optional but recommended debugger step
  6. Back in the 1st window you should go into the PHP Runtime tab and hit Sync Extensions with Interpreter.

Half-life Terminal as titled by Evan (cmder.exe)

Not really required but will make your life VERY easy

  1. Open Settings (CTRL + ALT + S) -> Tools > Terminal
  2. Change Shell path to {path to laragon goes here}\bin\cmder\cmder.bat

PS: Basically saves you the trouble of adding everything to the PATH variable on your machine. All the commands just work, no questions.

Composer

Not really required but you'll be updating dependencies so why not make it safe, almost automatic and easy as hell

  1. Open Settings (CTRL + ALT + S) -> Languages & Frameworks > PHP > Composer (Install from plugins if you don't have it for some reason)
  2. Path to json should be {path to project root}\composer.json
  3. For the execution choose executable, add the following path {path to laragon}\bin\composer\composer.bat and use default interpreter. (Alternatively choose phar and use the .phar)

Node.js / NPM / yarn

Really not required buuuut will make my life slightly easier... no? okay. fine don't make my life easy.

  1. Open Settings (CTRL + ALT + S) -> Languages & Frameworks > Node.js & NPM
  2. Add a new node interpreter
  3. Path to the executable is as follows {path to laragon}\bin\nodejs\{some_node_version_here}\node.exe

Database View

Not required unless you want to handle DB things.. laravel will handle most of it so you can skip this

  1. Open the database tab in the top of the right sidebar.
  2. Click the + icon > Data Source > MySQL
  3. Create a new source with the following info. Host = localhost, Database = SOEN341, user = root, password = (password is blank by default)
  4. You can now use the database viewer inside PHPStorm instead of HeidiSQL.

You're done if you see this

laravel welcome screen

CONGRATS!! 💯 🥇 I KNOW THIS WAS LONG