EA FC Clubs API, built on PHP/MySQL with Laravel 10.x, this retrieve game stats for all platforms of the EA FC 24 Clubs video game.
Note - there is currently no real 'frontend' as of yet, this will be coming it is currently just API requests that return json data based on a users clubId & platform (e.g PC, PlayStation 5 etc...)
PHP 8.1 + MySQL
NOTE - DUE TO CHANGES IN THE EA CLUBS API WITH THE RELEASE OF EA FC 24 MOST UNIT TESTS WON'T WORK UNTIL I GET AROUND TO MODIFYING THESE PLEASE BE PATIENT THANK YOU!
- clone the repository
composer install
(for dependencies)npm install
(frontend) &npm run dev
(to build js/css assets)cp .env.example .env
- modify the .env with your MySQL DB host, user & password details
- run
php artisan config:clear
to reload the modified .env - run
php artisan migrate
to create the database tables - run
php artisan db:seed
- run
php artisan proclubs:matches
to retrieve the last 5 matches for the user in the database - run
php artisan test
to run all the tests (takes approx 10 secs to complete) - there is a single user in the users table, the password is 'password' (although you don't need to login)
- postman collection can be imported into Postman app, in the _misc directory (NEEDS UPDATING SINCE THE RELEASE OF EA FC 24)
If using Laravel Sail (e.g Docker) - prefix sail in the command e.g sail artisan test
rather than php artisan test
etc..
run sail up... then https://localhost
also remember npm run dev