Skip to content

Commit 5e37693

Browse files
committed
Merge branch 'master' of github.com:remxcode/laravel-base
# Conflicts: # .env.example # .gitignore # app/Http/Kernel.php # app/Models/User.php # app/Providers/LocalServiceProvider.php # app/Providers/RouteServiceProvider.php # composer.json # config/app.php # config/broadcasting.php # config/cache.php # config/compile.php # config/database.php # config/filesystems.php # config/mail.php # gulpfile.js # routes/web.php # tests/Feature/ExampleTest.php
2 parents fccffd6 + 0cc8bfd commit 5e37693

Some content is hidden

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

43 files changed

+356
-297
lines changed

.env.example

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,25 @@ MAIL_PASSWORD=null
3030
MAIL_ENCRYPTION=null
3131

3232
PUSHER_APP_ID=
33-
PUSHER_KEY=
34-
PUSHER_SECRET=
35-
36-
WECHAT_APPID=
37-
WECHAT_SECRET=
38-
WECHAT_TOKEN=
39-
WECHAT_AES_KEY=
40-
41-
WECHAT_LOG_LEVEL=
42-
WECHAT_LOG_FILE=
43-
44-
WECHAT_OAUTH_SCOPES=
45-
WECHAT_OAUTH_CALLBACK=
46-
47-
WECHAT_PAYMENT_MERCHANT_ID=
48-
WECHAT_PAYMENT_KEY=
49-
WECHAT_PAYMENT_CERT_PATH=
50-
WECHAT_PAYMENT_KEY_PATH=
51-
WECHAT_PAYMENT_DEVICE_INFO=
52-
WECHAT_PAYMENT_SUB_APP_ID=
53-
WECHAT_PAYMENT_SUB_MERCHANT_ID=
33+
PUSHER_APP_KEY=
34+
PUSHER_APP_SECRET=
35+
36+
WECHAT_USE_ALIAS=false
37+
WECHAT_APPID=null
38+
WECHAT_SECRET=null
39+
WECHAT_TOKEN=null
40+
WECHAT_AES_KEY=null
41+
42+
WECHAT_LOG_LEVEL
43+
WECHAT_LOG_FILE
44+
45+
WECHAT_OAUTH_SCOPES
46+
WECHAT_OAUTH_CALLBACK
47+
48+
WECHAT_PAYMENT_MERCHANT_ID
49+
WECHAT_PAYMENT_KEY
50+
WECHAT_PAYMENT_CERT_PATH
51+
WECHAT_PAYMENT_KEY_PATH
52+
WECHAT_PAYMENT_DEVICE_INFO
53+
WECHAT_PAYMENT_SUB_APP_ID
54+
WECHAT_PAYMENT_SUB_MERCHANT_ID

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
* text=auto
22
*.css linguist-vendored
3-
*.scss linguist-vendored
3+
*.scss linguist-vendored

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/node_modules
22
/public/storage
3+
/public/hot
34
/storage/*.key
45
/vendor
56
/.idea

app/Exceptions/Handler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ protected function unauthenticated($request, AuthenticationException $exception)
6363
return response()->json(['error' => 'Unauthenticated.'], 401);
6464
}
6565

66-
return redirect()->guest('login');
66+
return redirect()->guest(route('login'));
6767
}
6868
}

app/Http/Controllers/Auth/RegisterController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class RegisterController extends Controller
2323
use RegistersUsers;
2424

2525
/**
26-
* Where to redirect users after login / registration.
26+
* Where to redirect users after registration.
2727
*
2828
* @var string
2929
*/

app/Http/Kernel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ class Kernel extends HttpKernel
1616
protected $middleware = [
1717
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
1818
\App\Http\Middleware\BeforeAutoTrimmer::class,
19+
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
20+
\App\Http\Middleware\TrimStrings::class,
21+
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
1922
];
2023

2124
/**
@@ -28,6 +31,7 @@ class Kernel extends HttpKernel
2831
\App\Http\Middleware\EncryptCookies::class,
2932
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
3033
\Illuminate\Session\Middleware\StartSession::class,
34+
// \Illuminate\Session\Middleware\AuthenticateSession::class,
3135
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
3236
\App\Http\Middleware\VerifyCsrfToken::class,
3337
\Illuminate\Routing\Middleware\SubstituteBindings::class,
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace App\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+
}

app/Models/User.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,4 @@ public function wechatAuth()
3636
{
3737
return $this->hasOne(UserAuth::class)->where('type', 'wechat');
3838
}
39-
40-
/**
41-
* Send the password reset notification.
42-
*
43-
* @param string $token
44-
*
45-
* @return void
46-
*/
47-
public function sendPasswordResetNotification($token)
48-
{
49-
// TODO: Implement sendPasswordResetNotification() method.
50-
}
5139
}

app/Providers/BroadcastServiceProvider.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ public function boot()
1616
{
1717
Broadcast::routes();
1818

19-
/*
20-
* Authenticate the user's personal channel...
21-
*/
22-
Broadcast::channel('App.User.*', function ($user, $userId) {
23-
return (int) $user->id === (int) $userId;
24-
});
19+
require base_path('routes/channels.php');
2520
}
2621
}

app/Providers/RouteServiceProvider.php

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,9 @@ public function map()
5151
*/
5252
protected function mapWebRoutes()
5353
{
54-
Route::group([
55-
'middleware' => 'web',
56-
'namespace' => $this->namespace,
57-
], function ($router) {
58-
require base_path('routes/web.php');
59-
});
54+
Route::middleware('web')
55+
->namespace($this->namespace)
56+
->group(base_path('routes/web.php'));
6057
}
6158

6259
/**
@@ -68,12 +65,9 @@ protected function mapWebRoutes()
6865
*/
6966
protected function mapApiRoutes()
7067
{
71-
Route::group([
72-
'middleware' => 'api',
73-
'namespace' => $this->namespace,
74-
'prefix' => 'api',
75-
], function ($router) {
76-
require base_path('routes/api.php');
77-
});
68+
Route::prefix('api')
69+
->middleware('api')
70+
->namespace($this->namespace)
71+
->group(base_path('routes/api.php'));
7872
}
7973
}

0 commit comments

Comments
 (0)