This is a REST API for a dice game application developed with Laravel PHP.
🎲 The game consists of rolling two dice and winning the round if the sum of the two dice is equal to 7.
Players can:
- Dice rolls.
- View game list.
- Delete game list.
- See success rate.
- Update nickname.
Admin can:
- View all players and their games.
- View player success rates.
- Winners ranking.
- Losers ranking.
There are two types of users in this application:
- Players: created by default.
- Administrators: defined in the database.
Authentication is done using Laravel Passport, enabling token-based authentication.
MySQL is used as the database management system to store application data.
Testing is performed using PHPUnit, a PHP unit testing tool.
Laravel 10 Laravel Passport PHPUnit MySQL
-
Clone this repository on your local machine.
git clone https://github.com/yourusername/yourrepository.git
-
Navigate to the project directory.
cd yourrepository
-
Install Composer dependencies.
composer install
-
Copy the example configuration file and set your own environment variables.
cp .env.example .env
-
Generate a unique application key.
php artisan key:generate
-
Configure the database in the
.env
file with your credentials. -
Run migrations to create the database tables.
php artisan migrate
php artisan db:seed
-
Start the development server.
php artisan serve
The Laravel framework is open-sourced software licensed under the MIT license.