Skip to content

Commit 72c4b75

Browse files
authored
Merge pull request #113 from BinaryStudioAcademy/dev
Release 1.1.0
2 parents b10f633 + 5b468a9 commit 72c4b75

File tree

80 files changed

+6336
-4787
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+6336
-4787
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
.idea
2-
.vscode
3-

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
language: php
77

88
php:
9-
- 7.2
9+
- 7.3
1010

1111
cache:
1212
directories:
@@ -15,13 +15,13 @@ cache:
1515
before_install:
1616
- cd $TRAVIS_BUILD_DIR/backend
1717
- composer validate
18-
- mysql -e 'CREATE DATABASE thread'
18+
- mysql -e 'CREATE DATABASE thread'
1919

2020
install:
2121
- composer install --no-interaction --prefer-source
2222

2323
before_script:
24-
- cp .env.travis .env
24+
- cp .env.travis .env
2525
- php artisan migrate --force
2626

2727
script:
@@ -30,4 +30,4 @@ script:
3030
after_success:
3131
- bash <(curl -s https://codecov.io/bash)
3232

33-
33+

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"eslint.workingDirectories": [
3+
{
4+
"directory": "./frontend",
5+
"changeProcessCWD": true
6+
}
7+
],
8+
}

backend/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ MAIL_USERNAME=null
3030
MAIL_PASSWORD=null
3131
MAIL_ENCRYPTION=null
3232
MAIL_FROM_ADDRESS=
33-
MAIL_FROM_NAME=
33+
MAIL_FROM_NAME="${APP_NAME}"
3434

3535
AWS_ACCESS_KEY_ID=
3636
AWS_SECRET_ACCESS_KEY=

backend/readme.md renamed to backend/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# BSA 2019 Thread (backend)
1+
# BSA Mini-Project - Thread (backend)
22

33
## Technologies
44

5-
* PHP 7.2 || 7.3
6-
* [Laravel 5.8](https://laravel.com)
5+
* PHP 7.3
6+
* [Laravel 6](https://laravel.com)
77
* [Docker](https://www.docker.com/)
88
* [Docker-compose](https://docs.docker.com/compose/)
99
* [Beanstalkd](https://github.com/beanstalkd/beanstalkd) - message queue (очередь сообщений для обработки тяжелых задач асинхронно)
@@ -67,4 +67,4 @@ [email protected]
6767
MAIL_FROM_NAME="BSA Thread Admin"
6868
```
6969

70-
You can debug your app with [Telescope](https://laravel.com/docs/5.8/telescope) tool which is installed already :)
70+
You can debug your app with [Telescope](https://laravel.com/docs/6.x/telescope) tool which is installed already :)

backend/app/Entity/User.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
use Illuminate\Database\Eloquent\Relations\HasMany;
99
use InvalidArgumentException;
1010
use Tymon\JWTAuth\Contracts\JWTSubject;
11-
use Illuminate\Notifications\Notifiable;
1211
use Illuminate\Foundation\Auth\User as Authenticatable;
12+
use Illuminate\Notifications\Notifiable;
1313

1414
/**
1515
* Class User
@@ -88,7 +88,7 @@ public function changeFirstName(string $firstName): void
8888

8989
$this->attributes['first_name'] = $firstName;
9090
}
91-
91+
9292
public function changeLastName(string $lastName): void
9393
{
9494
if (empty($lastName)) {

backend/app/Exceptions/Handler.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
1010
use Illuminate\Http\JsonResponse;
1111
use Illuminate\Http\Request;
12-
use Illuminate\Http\Response;
1312
use Illuminate\Support\Facades\Config;
1413
use Illuminate\Validation\ValidationException;
14+
use Symfony\Component\HttpFoundation\Response;
1515
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
1616
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
1717
use Illuminate\Auth\Access\AuthorizationException;
@@ -42,6 +42,7 @@ class Handler extends ExceptionHandler
4242
*
4343
* @param Exception $exception
4444
* @return void
45+
*
4546
* @throws Exception
4647
*/
4748
public function report(Exception $exception)
@@ -63,6 +64,8 @@ public function report(Exception $exception)
6364
* @param Request $request
6465
* @param Exception $exception
6566
* @return Response|JsonResponse
67+
*
68+
* @throws Exception
6669
*/
6770
public function render($request, Exception $exception)
6871
{
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
namespace App\Http\Controllers\Auth;
4+
5+
use App\Http\Controllers\Controller;
6+
use App\Providers\RouteServiceProvider;
7+
use Illuminate\Foundation\Auth\ConfirmsPasswords;
8+
9+
class ConfirmPasswordController extends Controller
10+
{
11+
/*
12+
|--------------------------------------------------------------------------
13+
| Confirm Password Controller
14+
|--------------------------------------------------------------------------
15+
|
16+
| This controller is responsible for handling password confirmations and
17+
| uses a simple trait to include the behavior. You're free to explore
18+
| this trait and override any functions that require customization.
19+
|
20+
*/
21+
22+
use ConfirmsPasswords;
23+
24+
/**
25+
* Where to redirect users when the intended url fails.
26+
*
27+
* @var string
28+
*/
29+
protected $redirectTo = RouteServiceProvider::HOME;
30+
31+
/**
32+
* Create a new controller instance.
33+
*
34+
* @return void
35+
*/
36+
public function __construct()
37+
{
38+
$this->middleware('auth');
39+
}
40+
}

backend/app/Http/Controllers/Auth/ForgotPasswordController.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,4 @@ class ForgotPasswordController extends Controller
1919
*/
2020

2121
use SendsPasswordResetEmails;
22-
23-
/**
24-
* Create a new controller instance.
25-
*
26-
* @return void
27-
*/
28-
public function __construct()
29-
{
30-
$this->middleware('guest');
31-
}
3222
}

backend/app/Http/Controllers/Auth/LoginController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace App\Http\Controllers\Auth;
44

55
use App\Http\Controllers\Controller;
6+
use App\Providers\RouteServiceProvider;
67
use Illuminate\Foundation\Auth\AuthenticatesUsers;
78

89
class LoginController extends Controller
@@ -25,7 +26,7 @@ class LoginController extends Controller
2526
*
2627
* @var string
2728
*/
28-
protected $redirectTo = '/home';
29+
protected $redirectTo = RouteServiceProvider::HOME;
2930

3031
/**
3132
* Create a new controller instance.

0 commit comments

Comments
 (0)