| 1 | <?php |
||
| 13 | abstract class AbstractController extends Controller |
||
| 14 | { |
||
| 15 | use DispatchesJobs; |
||
| 16 | use ValidatesRequests; |
||
| 17 | use AuthorizesRequests; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * The authentication guard. |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $guard; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * The broker name. |
||
| 28 | * |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | protected $broker; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Whitelisted methods. |
||
| 35 | * Array of whitelisted methods which do not need to go through middleware. |
||
| 36 | * |
||
| 37 | * @var array |
||
| 38 | */ |
||
| 39 | protected $middlewareWhitelist = []; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Create a new authenticated controller instance. |
||
| 43 | */ |
||
| 44 | public function __construct() |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Get the broker to be used. |
||
| 53 | * |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | protected function getBroker(): string |
||
| 60 | /** |
||
| 61 | * Get the guard to be used during authentication. |
||
| 62 | * |
||
| 63 | * @return string|null |
||
| 64 | */ |
||
| 65 | protected function getGuard(): ?string |
||
| 69 | |||
| 70 | /** |
||
| 71 | * Get the guest middleware for the application. |
||
| 72 | */ |
||
| 73 | protected function getGuestMiddleware() |
||
| 77 | |||
| 78 | /** |
||
| 79 | * Get the auth middleware for the application. |
||
| 80 | * |
||
| 81 | * @return string |
||
| 82 | */ |
||
| 83 | protected function getAuthMiddleware(): string |
||
| 87 | } |
||
| 88 |