Skip to content
This repository was archived by the owner on Dec 11, 2020. It is now read-only.

Commit 46776f2

Browse files
authored
Merge pull request #30 from lucid-architecture/5.6
Laravel v5.6
2 parents cb8f0a7 + c1163ea commit 46776f2

File tree

16 files changed

+214
-54
lines changed

16 files changed

+214
-54
lines changed

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ APP_DEBUG=true
44
APP_LOG_LEVEL=debug
55
APP_URL=http://localhost
66

7+
LOG_CHANNEL=stack
8+
79
DB_CONNECTION=mysql
810
DB_HOST=127.0.0.1
911
DB_PORT=3306
@@ -30,3 +32,6 @@ MAIL_ENCRYPTION=null
3032
PUSHER_APP_ID=
3133
PUSHER_APP_KEY=
3234
PUSHER_APP_SECRET=
35+
36+
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
37+
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

app/Http/Controllers/Auth/RegisterController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
namespace Framework\Http\Controllers\Auth;
44

5-
use Framework\User;
65
use Validator;
6+
use Framework\User;
7+
use Illuminate\Support\Facades\Hash;
78
use Framework\Http\Controllers\Controller;
89
use Illuminate\Foundation\Auth\RegistersUsers;
910

@@ -65,7 +66,7 @@ protected function create(array $data)
6566
return User::create([
6667
'name' => $data['name'],
6768
'email' => $data['email'],
68-
'password' => bcrypt($data['password']),
69+
'password' => Hash::make($data['password']),
6970
]);
7071
}
7172
}

app/Http/Kernel.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ class Kernel extends HttpKernel
5353
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
5454
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
5555
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
56+
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
5657
'can' => \Illuminate\Auth\Middleware\Authorize::class,
5758
'guest' => \Framework\Http\Middleware\RedirectIfAuthenticated::class,
59+
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
5860
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
5961
];
6062
}

app/Http/Middleware/TrustProxies.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace Framework\Http\Middleware;
4+
5+
use Illuminate\Http\Request;
6+
use Fideloper\Proxy\TrustProxies as Middleware;
7+
8+
class TrustProxies extends Middleware
9+
{
10+
/**
11+
* The trusted proxies for this application.
12+
*
13+
* @var array
14+
*/
15+
protected $proxies;
16+
17+
/**
18+
* The headers that should be used to detect proxies.
19+
*
20+
* @var int
21+
*/
22+
protected $headers = Request::HEADER_X_FORWARDED_ALL;
23+
}

composer.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@
55
"license": "MIT",
66
"type": "project",
77
"require": {
8-
"php": ">=7.0.0",
9-
"laravel/framework": "5.5.*",
10-
"lucid-arch/laravel-foundation": "5.5.*",
11-
"laravel/tinker": "~1.0"
8+
"php": ">=7.1.3",
9+
"laravel/framework": "5.6.*",
10+
"lucid-arch/laravel-foundation": "5.6.*",
11+
"laravel/tinker": "^1.0",
12+
"fideloper/proxy": "~4.0"
1213
},
1314
"require-dev": {
14-
"fzaninotto/faker": "~1.4",
15-
"mockery/mockery": "0.9.*",
16-
"phpunit/phpunit": "~6.0",
17-
"symfony/css-selector": "3.1.*",
18-
"symfony/dom-crawler": "3.1.*",
19-
"lucid-arch/laravel-console": "5.5.*"
15+
"fzaninotto/faker": "^1.4",
16+
"mockery/mockery": "^1.0",
17+
"nunomaduro/collision": "^2.0",
18+
"phpunit/phpunit": "~7.0",
19+
"symfony/css-selector": "~4.0",
20+
"symfony/dom-crawler": "~4.0",
21+
"lucid-arch/laravel-console": "5.6.*",
22+
"filp/whoops": "^2.0"
2023
},
2124
"autoload": {
2225
"classmap": [
@@ -36,12 +39,10 @@
3639
"php artisan key:generate"
3740
],
3841
"post-install-cmd": [
39-
"Illuminate\\Foundation\\ComposerScripts::postInstall",
40-
"php artisan optimize"
42+
"Illuminate\\Foundation\\ComposerScripts::postInstall"
4143
],
4244
"post-update-cmd": [
43-
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
44-
"php artisan optimize"
45+
"Illuminate\\Foundation\\ComposerScripts::postUpdate"
4546
],
4647
"post-autoload-dump": [
4748
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",

config/app.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -107,23 +107,6 @@
107107

108108
'cipher' => 'AES-256-CBC',
109109

110-
/*
111-
|--------------------------------------------------------------------------
112-
| Logging Configuration
113-
|--------------------------------------------------------------------------
114-
|
115-
| Here you may configure the log settings for your application. Out of
116-
| the box, Laravel uses the Monolog PHP logging library. This gives
117-
| you a variety of powerful log handlers / formatters to utilize.
118-
|
119-
| Available Settings: "single", "daily", "syslog", "errorlog"
120-
|
121-
*/
122-
123-
'log' => env('APP_LOG', 'single'),
124-
125-
'log_level' => env('APP_LOG_LEVEL', 'debug'),
126-
127110
/*
128111
|--------------------------------------------------------------------------
129112
| Autoloaded Service Providers

config/filesystems.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
| may even configure multiple disks of the same driver. Defaults have
3838
| been setup for each driver as an example of the required options.
3939
|
40-
| Supported Drivers: "local", "ftp", "s3", "rackspace"
40+
| Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
4141
|
4242
*/
4343

@@ -61,6 +61,7 @@
6161
'secret' => env('AWS_SECRET'),
6262
'region' => env('AWS_REGION'),
6363
'bucket' => env('AWS_BUCKET'),
64+
'url' => env('AWS_URL'),
6465
],
6566

6667
],

config/hashing.php

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Default Hash Driver
8+
|--------------------------------------------------------------------------
9+
|
10+
| This option controls the default hash driver that will be used to hash
11+
| passwords for your application. By default, the bcrypt algorithm is
12+
| used; however, you remain free to modify this option if you wish.
13+
|
14+
| Supported: "bcrypt", "argon"
15+
|
16+
*/
17+
18+
'driver' => 'bcrypt',
19+
20+
/*
21+
|--------------------------------------------------------------------------
22+
| Bcrypt Options
23+
|--------------------------------------------------------------------------
24+
|
25+
| Here you may specify the configuration options that should be used when
26+
| passwords are hashed using the Bcrypt algorithm. This will allow you
27+
| to control the amount of time it takes to hash the given password.
28+
|
29+
*/
30+
31+
'bcrypt' => [
32+
'rounds' => 10,
33+
],
34+
35+
/*
36+
|--------------------------------------------------------------------------
37+
| Argon Options
38+
|--------------------------------------------------------------------------
39+
|
40+
| Here you may specify the configuration options that should be used when
41+
| passwords are hashed using the Argon algorithm. These will allow you
42+
| to control the amount of time it takes to hash the given password.
43+
|
44+
*/
45+
46+
'argon' => [
47+
'memory' => 1024,
48+
'threads' => 2,
49+
'time' => 2,
50+
],
51+
52+
];

config/logging.php

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?php
2+
3+
use Monolog\Handler\StreamHandler;
4+
5+
return [
6+
7+
/*
8+
|--------------------------------------------------------------------------
9+
| Default Log Channel
10+
|--------------------------------------------------------------------------
11+
|
12+
| This option defines the default log channel that gets used when writing
13+
| messages to the logs. The name specified in this option should match
14+
| one of the channels defined in the "channels" configuration array.
15+
|
16+
*/
17+
18+
'default' => env('LOG_CHANNEL', 'stack'),
19+
20+
/*
21+
|--------------------------------------------------------------------------
22+
| Log Channels
23+
|--------------------------------------------------------------------------
24+
|
25+
| Here you may configure the log channels for your application. Out of
26+
| the box, Laravel uses the Monolog PHP logging library. This gives
27+
| you a variety of powerful log handlers / formatters to utilize.
28+
|
29+
| Available Drivers: "single", "daily", "slack", "syslog",
30+
| "errorlog", "monolog",
31+
| "custom", "stack"
32+
|
33+
*/
34+
35+
'channels' => [
36+
'stack' => [
37+
'driver' => 'stack',
38+
'channels' => ['single'],
39+
],
40+
41+
'single' => [
42+
'driver' => 'single',
43+
'path' => storage_path('logs/laravel.log'),
44+
'level' => 'debug',
45+
],
46+
47+
'daily' => [
48+
'driver' => 'daily',
49+
'path' => storage_path('logs/laravel.log'),
50+
'level' => 'debug',
51+
'days' => 7,
52+
],
53+
54+
'slack' => [
55+
'driver' => 'slack',
56+
'url' => env('LOG_SLACK_WEBHOOK_URL'),
57+
'username' => 'Laravel Log',
58+
'emoji' => ':boom:',
59+
'level' => 'critical',
60+
],
61+
62+
'stderr' => [
63+
'driver' => 'monolog',
64+
'handler' => StreamHandler::class,
65+
'with' => [
66+
'stream' => 'php://stderr',
67+
],
68+
],
69+
70+
'syslog' => [
71+
'driver' => 'syslog',
72+
'level' => 'debug',
73+
],
74+
75+
'errorlog' => [
76+
'driver' => 'errorlog',
77+
'level' => 'debug',
78+
],
79+
],
80+
81+
];

config/queue.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
'connection' => 'default',
6363
'queue' => 'default',
6464
'retry_after' => 90,
65+
'block_for' => null,
6566
],
6667

6768
],

0 commit comments

Comments
 (0)