faithgen /
laravel-sdk
| 1 | <?php |
||
| 2 | |||
| 3 | namespace FaithGen\SDK\Http\Middleware; |
||
| 4 | |||
| 5 | use Closure; |
||
| 6 | |||
| 7 | class ActivatedMinistryMiddleware |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Handle an incoming request. |
||
| 11 | * |
||
| 12 | * @param \Illuminate\Http\Request $request |
||
| 13 | * @param \Closure $next |
||
| 14 | * @return mixed |
||
| 15 | */ |
||
| 16 | public function handle($request, Closure $next) |
||
| 17 | { |
||
| 18 | if (auth(config('faithgen-sdk.guard'))->user()->activation->active) { |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 19 | return $next($request); |
||
| 20 | } else { |
||
| 21 | abort(403, 'You need to activate you account first to access this part'); |
||
| 22 | } |
||
| 23 | } |
||
| 24 | } |
||
| 25 |