Skip to content

Commit 46f4316

Browse files
committed
Upgrade from Laravel 5.5 to 5.6
1 parent 6ccfdc7 commit 46f4316

File tree

10 files changed

+2845
-2598
lines changed

10 files changed

+2845
-2598
lines changed

.env.example

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ APP_DEBUG=true
55
APP_LOG_LEVEL=debug
66
APP_URL=http://localhost
77

8+
LOG_CHANNEL=stack
9+
810
DB_CONNECTION=mysql
911
DB_HOST=127.0.0.1
1012
DB_PORT=3306
@@ -47,4 +49,4 @@ TWITTER_URL=<YOUR_SERVER_ROOT>/login/twitter
4749

4850
LINKEDIN_ID=
4951
LINKEDIN_SECRET=
50-
LINKEDIN_URL=<YOUR_SERVER_ROOT>/login/linkedin
52+
LINKEDIN_URL=<YOUR_SERVER_ROOT>/login/linkedin

app/Http/Controllers/Api/UserController.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Illuminate\Http\Request;
66
use App\Http\Controllers\Controller;
7+
use Illuminate\Support\Facades\Hash;
78
use App\User;
89
use Tymon\JWTAuth\Exceptions\JWTException;
910
use Tymon\JWTAuth\Facades\JWTAuth;
@@ -20,7 +21,7 @@ public function register(Request $request){
2021
$user = $this->user->create([
2122
'name' => $request->get('name'),
2223
'email' => $request->get('email'),
23-
'password' => bcrypt($request->get('password'))
24+
'password' => Hash::make($request->get('password'))
2425
]);
2526

2627
return response()->json(['status'=>true,'message'=>'User created successfully','data'=>$user]);

app/Http/Controllers/Auth/RegisterController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
use App\User;
66
use App\Http\Controllers\Controller;
7-
use Illuminate\Http\Request;
87
use Illuminate\Support\Facades\Hash;
8+
use Illuminate\Http\Request;
99
use Mockery\Exception;
1010
use Validator;
1111

app/Http/Middleware/TrustProxies.php

+3-9
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,9 @@ class TrustProxies extends Middleware
1515
protected $proxies;
1616

1717
/**
18-
* The current proxy header mappings.
18+
* The headers that should be used to detect proxies.
1919
*
20-
* @var array
20+
* @var string
2121
*/
22-
protected $headers = [
23-
Request::HEADER_FORWARDED => 'FORWARDED',
24-
Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
25-
Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
26-
Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
27-
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
28-
];
22+
protected $headers = Request::HEADER_X_FORWARDED_ALL;
2923
}

composer.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"license": "MIT",
66
"type": "project",
77
"require": {
8-
"php": ">=7.0.0",
9-
"fideloper/proxy": "~3.3",
10-
"laravel/framework": "5.5.*",
8+
"php": "^7.1.3",
9+
"fideloper/proxy": "^4.0",
10+
"laravel/framework": "5.6.*",
1111
"laravel/socialite": "^3.0",
1212
"laravel/tinker": "~1.0",
1313
"tymon/jwt-auth": "^0.5.12"
@@ -16,7 +16,7 @@
1616
"filp/whoops": "~2.0",
1717
"fzaninotto/faker": "~1.4",
1818
"mockery/mockery": "~1.0",
19-
"phpunit/phpunit": "~6.0"
19+
"phpunit/phpunit": "~7.0"
2020
},
2121
"autoload": {
2222
"classmap": [

0 commit comments

Comments
 (0)