File: D:/HostingSpaces/SBogers10/otto-das.komma.pro/app/Users/Request/MailUserToSetPasswordRequest.php
<?php declare(strict_types=1);
namespace App\Users\Request;
use Komma\KMS\Users\Models\KmsUser;
use Komma\KMS\Users\Models\KmsUserRole;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
class MailUserToSetPasswordRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
/** @var KmsUser $authUser */
$authUser = Auth::user();
return $authUser && $authUser->isAtLeast(KmsUserRole::Admin);
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'user_id' => 'required|integer',
];
}
}