for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Cortex\Auth\Http\Requests\Frontarea;
use Rinvex\Support\Traits\Escaper;
use Illuminate\Foundation\Http\FormRequest;
use Cortex\Foundation\Exceptions\GenericException;
class TenantRegistrationRequest extends FormRequest
{
use Escaper;
/**
* Determine if the user is authorized to make this request.
*
* @throws \Cortex\Foundation\Exceptions\GenericException
* @return bool
*/
public function authorize(): bool
if (! config('cortex.auth.registration.enabled')) {
throw new GenericException(trans('cortex/auth::messages.register.disabled'));
}
return true;
* Configure the validator instance.
* @param \Illuminate\Validation\Validator $validator
* @return void
public function withValidator($validator): void
$validator
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
// Sanitize input data before submission
$this->replace(array_merge($this->all(), $this->escape($this->except(['password', 'password_confirmation']))));
* Get the validation rules that apply to the request.
* @return array
public function rules(): array
return [];
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.