Skip to content

Commit d2e75b8

Browse files
committed
. Fixed new middleware stack
- Fixed html alias facade - Removed redundant migrations
1 parent 1594eb9 commit d2e75b8

9 files changed

+245
-379
lines changed

app/Authentication/AuthenticationServiceProvider.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,18 @@ class AuthenticationServiceProvider extends ServiceProvider {
2727
protected $defer = false;
2828

2929
protected $providers = [
30-
'LaravelAcl\Library\LibraryServiceProvider',
31-
'Cartalyst\Sentry\SentryServiceProvider',
32-
'Intervention\Image\ImageServiceProvider'
30+
\LaravelAcl\Library\LibraryServiceProvider::class,
31+
\Cartalyst\Sentry\SentryServiceProvider::class,
32+
\Intervention\Image\ImageServiceProvider::class,
33+
\Collective\Html\HtmlServiceProvider::class
3334
];
3435

3536
protected $aliases = [
36-
"Sentry" => 'Cartalyst\Sentry\Facades\Laravel\Sentry',
37-
"Image" => 'Intervention\Image\Facades\Image'
37+
"Sentry" => \Cartalyst\Sentry\Facades\Laravel\Sentry::class,
38+
"Image" => \Intervention\Image\Facades\Image::class,
39+
'Form' => \Collective\Html\FormFacade::class,
40+
'Html' => \Collective\Html\HtmlFacade::class,
41+
'HTML' => \Collective\Html\HtmlFacade::class
3842
];
3943

4044
/**
@@ -236,7 +240,6 @@ protected function publishMigrations()
236240

237241
$this->publishes([
238242
__DIR__ . '/../../database/migrations' => $this->app->databasePath() . '/migrations',
239-
// __DIR__.'/../../database/seeds' => $this->app->databasePath().'/seeds',
240243
]);
241244
}
242245
}

app/Http/Kernel.php

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,40 @@
44

55
class Kernel extends HttpKernel {
66

7-
/**
8-
* The application's global HTTP middleware stack.
9-
*
10-
* @var array
11-
*/
12-
protected $middleware = [
13-
'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode',
14-
'Illuminate\Cookie\Middleware\EncryptCookies',
15-
'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse',
16-
'Illuminate\Session\Middleware\StartSession',
17-
'Illuminate\View\Middleware\ShareErrorsFromSession',
18-
'LaravelAcl\Http\Middleware\VerifyCsrfToken',
19-
];
7+
/**
8+
* The application's global HTTP middleware stack.
9+
*
10+
* These middleware are run during every request to your application.
11+
*
12+
* @var array
13+
*/
14+
protected $middleware = [
15+
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
16+
];
17+
/**
18+
* The application's route middleware groups.
19+
*
20+
* @var array
21+
*/
22+
protected $middlewareGroups = [
23+
'web' => [
24+
'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse',
25+
'Illuminate\Session\Middleware\StartSession',
26+
'Illuminate\View\Middleware\ShareErrorsFromSession',
27+
'LaravelAcl\Http\Middleware\VerifyCsrfToken',
28+
'LaravelAcl\Http\Middleware\EncryptCookies',
29+
],
30+
'api' => [
31+
'throttle:60,1',
32+
],
33+
];
34+
35+
// protected $routeMiddleware = [
36+
// 'auth' => \App\Http\Middleware\Authenticate::class,
37+
// 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
38+
// 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
39+
// 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
40+
// ];
2041

2142
/**
2243
* The application's route middleware.
@@ -29,5 +50,4 @@ class Kernel extends HttpKernel {
2950
'can_see' => Middleware\CanSee::class,
3051
'has_perm' => Middleware\HasPerm::class,
3152
];
32-
3353
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php namespace LaravelAcl\Http\Middleware;
2+
3+
use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter;
4+
5+
class EncryptCookies extends BaseEncrypter
6+
{
7+
/**
8+
* The names of the cookies that should not be encrypted.
9+
*
10+
* @var array
11+
*/
12+
protected $except = [
13+
//
14+
];
15+
}

0 commit comments

Comments
 (0)