Skip to content
Betting game with Angular 2, Laravel and Material Design Lite that I originally wrote for Euro 2016 in France.
PHP TypeScript HTML JavaScript CSS ApacheConf Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_angular
app
bootstrap
config
database
public
resources/views
storage
tests
.env.example
.gitattributes
.gitignore
LICENSE
README.md
artisan
composer.json
dist.sh
package.json
phpspec.yml
phpunit.xml
server.php

README.md

Tippspiel

This project is basing on two projects: Zemke/starter-laravel-angular and angular/quickstart. So you might want to read those two first to know how to set these apps up individually. The PHP part is everything, but the Angular part is in _angular.

dist.sh

This copies the Angular parts in _angular into the PHP structure, so that you can use both worlds in one context. This could then be deployed.

API Endpoint

cp _angular/app/api-endpoint.ts.default _angular/app/api-endpoint.ts

Adjust the variable in _angular/app/api-endpoint.ts as you need. Like when you host your backend somewhere else, you would change / to http://localhost:8080/ so Angular knows where to point the REST calls at.

Environment conf

There are two additional environment variables that you probably don’t know from the default .env file.

FINAL_ROUND_START: An ISO date string. This is basically the deadline for bets of the tournament champion. When this date is past, users won’t be able to submit bets for the champions of the tournament anymore. Most of the times you’d want that to be the start of the final round of the tournament or even the first game.

FINALE_MATCHDAY: The matchday number of the finale of the tournament as seen on football-data.org. You know the final matchday by going to http://api.football-data.org/v1/soccerseasons/{seasonId} and then there’s the attribute numberOfMatchdays which is probably the finale. The information is important to know when the points for the bet of the champion on of the tournament should be added.

You can’t perform that action at this time.