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

Commit d2db2ab

Browse files
authored
Merge pull request #17 from adibhanna/laravel_5_4
Laravel 5.4
2 parents 4c182e1 + 738de3e commit d2db2ab

39 files changed

+5325
-240
lines changed

.env.example

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
11
APP_ENV=local
2+
APP_KEY=
23
APP_DEBUG=true
3-
APP_KEY=SomeRandomString
4+
APP_LOG_LEVEL=debug
5+
APP_URL=http://localhost
46

5-
DB_HOST=localhost
7+
DB_CONNECTION=mysql
8+
DB_HOST=127.0.0.1
9+
DB_PORT=3306
610
DB_DATABASE=homestead
711
DB_USERNAME=homestead
812
DB_PASSWORD=secret
913

14+
BROADCAST_DRIVER=log
1015
CACHE_DRIVER=file
1116
SESSION_DRIVER=file
1217
QUEUE_DRIVER=sync
1318

19+
REDIS_HOST=127.0.0.1
20+
REDIS_PASSWORD=null
21+
REDIS_PORT=6379
22+
1423
MAIL_DRIVER=smtp
1524
MAIL_HOST=mailtrap.io
1625
MAIL_PORT=2525
1726
MAIL_USERNAME=null
1827
MAIL_PASSWORD=null
1928
MAIL_ENCRYPTION=null
29+
30+
PUSHER_APP_ID=
31+
PUSHER_APP_KEY=
32+
PUSHER_APP_SECRET=

app/Http/Kernel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ class Kernel extends HttpKernel
1515
*/
1616
protected $middleware = [
1717
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
18+
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
19+
\Framework\Http\Middleware\TrimStrings::class,
20+
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
1821
];
1922

2023
/**
@@ -27,6 +30,7 @@ class Kernel extends HttpKernel
2730
\Framework\Http\Middleware\EncryptCookies::class,
2831
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
2932
\Illuminate\Session\Middleware\StartSession::class,
33+
// \Illuminate\Session\Middleware\AuthenticateSession::class,
3034
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
3135
\Framework\Http\Middleware\VerifyCsrfToken::class,
3236
\Illuminate\Routing\Middleware\SubstituteBindings::class,

app/Http/Middleware/TrimStrings.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace Framework\Http\Middleware;
4+
5+
use Illuminate\Foundation\Http\Middleware\TrimStrings as BaseTrimmer;
6+
7+
class TrimStrings extends BaseTrimmer
8+
{
9+
/**
10+
* The names of the attributes that should not be trimmed.
11+
*
12+
* @var array
13+
*/
14+
protected $except = [
15+
'password',
16+
'password_confirmation',
17+
];
18+
}

composer.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
"type": "project",
77
"require": {
88
"php": ">=5.6.4",
9-
"laravel/framework": "5.3.*",
10-
"lucid-arch/laravel-foundation": "5.3.*"
9+
"laravel/framework": "5.4.*",
10+
"lucid-arch/laravel-foundation": "5.3.*",
11+
"laravel/tinker": "~1.0"
1112
},
1213
"require-dev": {
1314
"fzaninotto/faker": "~1.4",
@@ -23,14 +24,10 @@
2324
],
2425
"psr-4": {
2526
"Framework\\": "app/",
26-
"App\\": "src/"
27+
"App\\": "src/",
28+
"Tests\\": "tests/"
2729
}
2830
},
29-
"autoload-dev": {
30-
"classmap": [
31-
"tests/TestCase.php"
32-
]
33-
},
3431
"scripts": {
3532
"post-root-package-install": [
3633
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
@@ -48,6 +45,9 @@
4845
]
4946
},
5047
"config": {
51-
"preferred-install": "dist"
52-
}
48+
"preferred-install": "dist",
49+
"sort-packages": true
50+
},
51+
"minimum-stability": "dev",
52+
"prefer-stable": true
5353
}

config/app.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,20 +166,20 @@
166166
/*
167167
* Package Service Providers...
168168
*/
169-
170-
//
169+
Laravel\Tinker\TinkerServiceProvider::class,
171170

172171
/*
173172
* Application Service Providers...
174173
*/
175174
Framework\Providers\AppServiceProvider::class,
176-
// Framework\Providers\BroadcastServiceProvider::class,
177175
Framework\Providers\AuthServiceProvider::class,
176+
// Framework\Providers\BroadcastServiceProvider::class,
178177
Framework\Providers\EventServiceProvider::class,
179178
Framework\Providers\RouteServiceProvider::class,
180179

181180
App\Foundation\ServiceProvider::class,
182181
Lucid\Console\LucidServiceProvider::class,
182+
183183
],
184184

185185
/*
@@ -199,6 +199,8 @@
199199
'Artisan' => Illuminate\Support\Facades\Artisan::class,
200200
'Auth' => Illuminate\Support\Facades\Auth::class,
201201
'Blade' => Illuminate\Support\Facades\Blade::class,
202+
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
203+
'Bus' => Illuminate\Support\Facades\Bus::class,
202204
'Cache' => Illuminate\Support\Facades\Cache::class,
203205
'Config' => Illuminate\Support\Facades\Config::class,
204206
'Cookie' => Illuminate\Support\Facades\Cookie::class,

config/auth.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
'providers' => [
6868
'users' => [
6969
'driver' => 'eloquent',
70-
'model' => Framework\User::class,
70+
'model' => App\User::class,
7171
],
7272

7373
// 'users' => [
@@ -81,10 +81,6 @@
8181
| Resetting Passwords
8282
|--------------------------------------------------------------------------
8383
|
84-
| Here you may set the options for resetting passwords including the view
85-
| that is your password reset e-mail. You may also set the name of the
86-
| table that maintains all of the reset tokens for your application.
87-
|
8884
| You may specify multiple password reset configurations if you have more
8985
| than one user table or model in the application and you want to have
9086
| separate password reset settings based on the specific user types.

config/broadcasting.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232

3333
'pusher' => [
3434
'driver' => 'pusher',
35-
'key' => env('PUSHER_KEY'),
36-
'secret' => env('PUSHER_SECRET'),
35+
'key' => env('PUSHER_APP_KEY'),
36+
'secret' => env('PUSHER_APP_SECRET'),
3737
'app_id' => env('PUSHER_APP_ID'),
3838
'options' => [
3939
//

config/cache.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@
4646

4747
'file' => [
4848
'driver' => 'file',
49-
'path' => storage_path('framework/cache'),
49+
'path' => storage_path('framework/cache/data'),
5050
],
5151

5252
'memcached' => [
5353
'driver' => 'memcached',
5454
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
55-
'sasl' => [
55+
'sasl' => [
5656
env('MEMCACHED_USERNAME'),
5757
env('MEMCACHED_PASSWORD'),
5858
],
59-
'options' => [
59+
'options' => [
6060
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
6161
],
6262
'servers' => [

config/compile.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

config/database.php

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,6 @@
22

33
return [
44

5-
/*
6-
|--------------------------------------------------------------------------
7-
| PDO Fetch Style
8-
|--------------------------------------------------------------------------
9-
|
10-
| By default, database results will be returned as instances of the PHP
11-
| stdClass object; however, you may desire to retrieve records in an
12-
| array format for simplicity. Here you can tweak the fetch style.
13-
|
14-
*/
15-
16-
'fetch' => PDO::FETCH_OBJ,
17-
185
/*
196
|--------------------------------------------------------------------------
207
| Default Database Connection Name
@@ -54,21 +41,21 @@
5441

5542
'mysql' => [
5643
'driver' => 'mysql',
57-
'host' => env('DB_HOST', 'localhost'),
44+
'host' => env('DB_HOST', '127.0.0.1'),
5845
'port' => env('DB_PORT', '3306'),
5946
'database' => env('DB_DATABASE', 'forge'),
6047
'username' => env('DB_USERNAME', 'forge'),
6148
'password' => env('DB_PASSWORD', ''),
62-
'charset' => 'utf8',
63-
'collation' => 'utf8_unicode_ci',
49+
'charset' => 'utf8mb4',
50+
'collation' => 'utf8mb4_unicode_ci',
6451
'prefix' => '',
6552
'strict' => true,
6653
'engine' => null,
6754
],
6855

6956
'pgsql' => [
7057
'driver' => 'pgsql',
71-
'host' => env('DB_HOST', 'localhost'),
58+
'host' => env('DB_HOST', '127.0.0.1'),
7259
'port' => env('DB_PORT', '5432'),
7360
'database' => env('DB_DATABASE', 'forge'),
7461
'username' => env('DB_USERNAME', 'forge'),
@@ -107,10 +94,10 @@
10794

10895
'redis' => [
10996

110-
'cluster' => false,
97+
'client' => 'predis',
11198

11299
'default' => [
113-
'host' => env('REDIS_HOST', 'localhost'),
100+
'host' => env('REDIS_HOST', '127.0.0.1'),
114101
'password' => env('REDIS_PASSWORD', null),
115102
'port' => env('REDIS_PORT', 6379),
116103
'database' => 0,

0 commit comments

Comments
 (0)