Skip to content

Commit

Permalink
Merge pull request laravel#1431 from antonybudi/patch-1
Browse files Browse the repository at this point in the history
Add missing use Closure
  • Loading branch information
taylorotwell committed May 19, 2015
2 parents 9d86532 + ed7cd54 commit 16dca18
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ To create a new middleware, use the `make:middleware` Artisan command:
This command will place a new `OldMiddleware` class within your `app/Http/Middleware` directory. In this middleware, we will only allow access to the route if the supplied `age` is greater than 200. Otherwise, we will redirect the users back to the "home" URI.

<?php namespace App\Http\Middleware;

use Closure;

class OldMiddleware {

Expand Down Expand Up @@ -55,6 +57,8 @@ It's best to envision middleware as a series of "layers" HTTP requests must pass
Whether a middleware runs before or after a request depends on the middleware itself. This middleware would perform some task **before** the request is handled by the application:

<?php namespace App\Http\Middleware;

use Closure;

class BeforeMiddleware implements Middleware {

Expand All @@ -69,6 +73,8 @@ Whether a middleware runs before or after a request depends on the middleware it
However, this middleware would perform its task **after** the request is handled by the application:

<?php namespace App\Http\Middleware;

use Closure;

class AfterMiddleware implements Middleware {

Expand Down

0 comments on commit 16dca18

Please sign in to comment.