Skip to content

Commit

Permalink
Authorize
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristories committed Sep 25, 2018
1 parent b1ae2c4 commit d679fd1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Http/Middleware/Authorize.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Kristories\Novassport\Http\Middleware;

use Kristories\Novassport\Novassport;

class Authorize
{
/**
* Handle the incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return \Illuminate\Http\Response
*/
public function handle($request, $next)
{
return resolve(Novassport::class)->authorize($request) ? $next($request) : abort(403);
}
}

0 comments on commit d679fd1

Please sign in to comment.