<?php

    namespace App\Http\Requests\User;

    use Illuminate\Foundation\Http\FormRequest;

    /**
     * Class Enable2FA
     *
     * @package App\Http\Requests\User
     */
    class Enable2FA extends FormRequest {
        /**
         * Determine if the user is authorized to make this request.
         *
         * @return bool
         */
        public function authorize() {
            return \Auth::check();
        }

        /**
         * Get the validation rules that apply to the request.
         *
         * @return array
         */
        public function rules() {
            return [
                'key' => 'required|string|min:6'
            ];
        }
    }

Allow users to set up 2fa
Allow users to set up 2fa
