1 | <?php |
||
2 | |||
3 | namespace Fouladgar\MobileVerification\Http\Controllers; |
||
4 | |||
5 | use Fouladgar\MobileVerification\Concerns\VerifiesMobiles; |
||
6 | use Fouladgar\MobileVerification\Tokens\TokenBrokerInterface; |
||
7 | use Illuminate\Routing\Controller; |
||
8 | |||
9 | abstract class BaseVerificationController extends Controller implements BaseVerificationControllerInterface |
||
10 | { |
||
11 | use VerifiesMobiles; |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
12 | |||
13 | /** |
||
14 | * @var TokenBrokerInterface |
||
15 | */ |
||
16 | protected $tokenBroker; |
||
17 | |||
18 | /** |
||
19 | * Create a new controller instance. |
||
20 | * |
||
21 | * @param TokenBrokerInterface $tokenBroker |
||
22 | * |
||
23 | * @return void |
||
24 | */ |
||
25 | public function __construct(TokenBrokerInterface $tokenBroker) |
||
26 | { |
||
27 | $this->middleware(config('mobile_verifier.middleware', ['web', 'auth'])); |
||
28 | |||
29 | $throttle = config('mobile_verifier.throttle', 10); |
||
30 | |||
31 | $this->middleware("throttle:$throttle,1")->only('verify', 'resend'); |
||
32 | |||
33 | $this->tokenBroker = $tokenBroker; |
||
34 | } |
||
35 | } |
||
36 |