EscolaLMS/Auth

View on GitHub
src/Http/Requests/SocialAuthRequest.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace EscolaLms\Auth\Http\Requests;

class SocialAuthRequest extends ExtendableRequest
{
    protected function prepareForValidation(): void
    {
        $this->merge(['provider' => $this->route('provider')]);
    }

    public function rules(): array
    {
        return [
            'provider' => ['required', 'string', 'in:facebook,google'],
            'return_url' => ['sometimes', 'url', 'nullable'],
        ];
    }
}