osb/app/Http/Middleware/Reseller.php

19 lines
300 B
PHP
Raw Normal View History

2018-07-17 04:10:40 +00:00
<?php
namespace App\Http\Middleware;
use Illuminate\Support\Facades\Auth;
use Closure;
class Reseller
{
public function handle($request, Closure $next)
{
if (! in_array(Auth::user()->role(),['Wholesaler','Reseller']))
{
abort(303,'Not Reseller');
} else
return $next($request);
}
}