Let's take a few minutes to ensure your system is set up to run this Laravel web app. If you're already up and running, you should be good to go... unless you want a refresher course.
You will need to make sure you have the following installed before you even think about moving forward:
- Git (obviously)
- PHP (We recommend 7.2+)
- Composer
- Node/NPM
- MySQL (5.7 or 8)
Once you are assured the above are installed, be sure you can access the following via your preferred shell/command prompt: composer
, npm
, git
. If you can execute those commands, you're good for now.
-
For Windows, I would use this tutorial from Medium. - I have just found this one a little easier than the laravel docs because Windows is so weird
-
For MacOS or Linux, I would use the Laravel Docs.
You will need to add 3 separate entries to your hosts file. They are:
- buffs.test
- oauth.buffs.test
- cauldron.buffs.test
Be sure to name your database something like buffs_dev and reflect that in your homestead.yaml
file.
Download the latest copy of the .env file from the Google Share (or request one if you're new to the project). Be sure to set the correct database settings, URL/domain settings, etc. A sample .env file will be included for your convenience to use as a template, but things like OAUTH/Twitch API keys will not be included.
Run the following commands to install & build any dependencies:
composer install
(Installs PHP & Laravel based dependencies) If on Windows, be sure to run this from within your Homestead VM via SSHvagrant ssh
- IF YOU CREATED YOUR OWN .ENV FILE:
php artisan key:generate
(Generates a new base64 app key, and adds it to your .env file) php artisan migrate:fresh --seed
(Setup the database tables & seed the initial data)npm install
(Installs Node dependcies like bootstrap, jquery, etc)npm run dev
(Compiles the most recent JS/SCSS)
Check it out by visiting the link listed in your homestead.yaml
in your browser. Probably something like. https://buffs.test
. If everything is running/built correctly you should be in business!
GraphQL has been implemented for this project. During testing, the GraphQL-Playground library will be available, and accessible via the buffs.test/graphql-playground
url. To edit the schema, checkout the file in the /graphql
directory.