-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
219 changed files
with
12,018 additions
and
1,883 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,29 +2,27 @@ APP_NAME=Laravel | |
APP_ENV=local | ||
APP_KEY= | ||
APP_DEBUG=true | ||
APP_URL=http://localhost | ||
APP_URL= | ||
APP_IMAGES_DIRECTORY=./public/images | ||
|
||
DEFAULT_ADMIN_EMAIL='[email protected]' | ||
DEFAULT_ADMIN_PASSWORD='min8Charters' | ||
|
||
LOG_CHANNEL=stack | ||
LOG_LEVEL=debug | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=3306 | ||
DB_DATABASE=laravel | ||
DB_USERNAME=root | ||
DB_DATABASE= | ||
DB_USERNAME= | ||
DB_PASSWORD= | ||
|
||
BROADCAST_DRIVER=log | ||
CACHE_DRIVER=file | ||
QUEUE_CONNECTION=sync | ||
BROADCAST_DRIVER=pusher | ||
CACHE_DRIVER=none | ||
QUEUE_CONNECTION=database | ||
SESSION_DRIVER=file | ||
SESSION_LIFETIME=120 | ||
|
||
MEMCACHED_HOST=127.0.0.1 | ||
|
||
REDIS_HOST=127.0.0.1 | ||
REDIS_PASSWORD=null | ||
REDIS_PORT=6379 | ||
SESSION_LIFETIME=3600 | ||
|
||
MAIL_MAILER=smtp | ||
MAIL_HOST=mailhog | ||
|
@@ -35,15 +33,10 @@ MAIL_ENCRYPTION=null | |
MAIL_FROM_ADDRESS=null | ||
MAIL_FROM_NAME="${APP_NAME}" | ||
|
||
AWS_ACCESS_KEY_ID= | ||
AWS_SECRET_ACCESS_KEY= | ||
AWS_DEFAULT_REGION=us-east-1 | ||
AWS_BUCKET= | ||
|
||
PUSHER_APP_ID= | ||
PUSHER_APP_KEY= | ||
PUSHER_APP_SECRET= | ||
PUSHER_APP_CLUSTER=mt1 | ||
PUSHER_APP_CLUSTER= | ||
|
||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" | ||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,27 @@ | ||
## About Chess | ||
# About project | ||
|
||
This is web chess. Project was created for learn how to use websocket and up my programming skills. | ||
This is web chess. Project was created for learn how to use websocket, vue 3, laravel, and up my programming skills. | ||
|
||
I used laravel, vue, axios, laravel breeze and sass. As static code analysis i used eslint. | ||
![Снимок экрана от 2021-07-10 20-21-32](https://user-images.githubusercontent.com/47294127/125165508-7272dc80-e1c1-11eb-82f5-52921afbb3cc.png) | ||
|
||
## Installation | ||
|
||
First you need to set up the env file. Register an account in pusher https://pusher.com, before setting. An administrator user is created in the seeder, you can set his parameters in the env file. | ||
|
||
Next enter the following commands. | ||
|
||
`npm install` | ||
|
||
`npm run production` | ||
|
||
`composer install` | ||
|
||
`php artisan migrate` | ||
|
||
`php artisan db:seed` | ||
|
||
`php artisan key:generate` | ||
|
||
`php artisan serve` | ||
|
||
`php artisan queue:listen` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
namespace App\Exceptions; | ||
|
||
use Exception; | ||
use Illuminate\Http\JsonResponse; | ||
use Illuminate\Http\Request; | ||
use JetBrains\PhpStorm\Pure; | ||
use Throwable; | ||
|
||
class ChessRuleException extends Exception | ||
{ | ||
/** | ||
* This fields can override default fields in render method | ||
* $default = [ | ||
* status => false, | ||
* message => $this->message | ||
* ] | ||
* | ||
* @var array | ||
*/ | ||
protected array $additionalResponseFields = []; | ||
|
||
/** | ||
* ChessRuleException constructor. | ||
* | ||
* @param string $message | ||
* @param int $code | ||
* @param Throwable|null $previous | ||
* @param array $additionalResponseFields | ||
*/ | ||
#[Pure] public function __construct( | ||
string $message = "", | ||
int $code = 0, | ||
Throwable $previous = null, | ||
array $additionalResponseFields = [] | ||
) | ||
{ | ||
parent::__construct($message, $code, $previous); | ||
|
||
$this->additionalResponseFields = $additionalResponseFields; | ||
} | ||
|
||
/** | ||
* Render the exception into an HTTP response. | ||
* | ||
* @param Request $request | ||
* @return JsonResponse | ||
*/ | ||
public function render(Request $request): JsonResponse | ||
{ | ||
$defaultResponse = [ | ||
'status' => false, | ||
'message' => $this->message, | ||
]; | ||
|
||
return response()->json(array_merge($defaultResponse, $this->additionalResponseFields)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace App\Exceptions; | ||
|
||
use Exception; | ||
use Illuminate\Http\JsonResponse; | ||
|
||
class TablePaginationValidationException extends Exception | ||
{ | ||
/** | ||
* @return JsonResponse | ||
*/ | ||
public function render(): JsonResponse | ||
{ | ||
$status = $this->code >= 400 && $this->code <= 500 ? $this->code : 422; | ||
|
||
return response()->json([ | ||
'status' => false, | ||
'message' => $this->message, | ||
], $status); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.