-
Clone the repo
git clone https://github.com/mchekin/rpg.git game
-
Navigate to the project folder
cd game
-
Create .env file from the .env.example file
cp .env.example .env
On Windows:
copy .env.example .env
-
Run composer install to import the dependencies and enable auto-loading
composer install
-
Generate Laravel Application key
php artisan key:generate
-
Create SQLite database file
touch database/database.sqlite
On Windows:
copy NUL database\database.sqlite
-
Run Laravel database migrations and seeds
php artisan migrate --seed
-
Run PHP build-in development server on the host machine
php artisan serve
-
Navigate to http://localhost:8000/
-
Enable Laravel Task Scheduling
-
Open the cron tab file
crontab -e
-
Add the following line and save
* * * * * php <path-to-project>/artisan schedule:run >> /dev/null 2>&1
On Windows:
schtasks /create /sc minute /mo 1 /tn "RPG SCHEDULER" /tr %cd%\scheduler.bat
To disable the annoying command-line pop-up each time the task runs:
- Open Windows "Run" dialog by pressing "Windows Key + r"
- Enter type "Taskschd.msc" and press Enter. This will open the "Task Scheduler".
- In Task Scheduler's "Active Tasks" section find the "RPG SCHEDULER" task and double-click it.
- In the left "Actions" panel click "Properties". This will open "Properties" pop-up.
- In the pop-up select the "Run whether user is logged in or not" and press Enter. You maybe asked for your Windows user's password to complete the process.
To remove the scheduled task you can use
schtasks /delete /tn "RPG SCHEDULER" /f
-
Open-sourced software licensed under the MIT license