%PDF- %PDF-
Direktori : /home/forge/api-takeaseat.eco-n-tech.co.uk/app/Http/Requests/ |
Current File : //home/forge/api-takeaseat.eco-n-tech.co.uk/app/Http/Requests/StoreInvitation.php |
<?php namespace App\Http\Requests; use App\Http\Requests\ApiRequest; class StoreInvitation extends ApiRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return auth()->guard('api')->check() && auth()->user()->hasRole('therapist'); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'first_name' => ['required', 'string', 'max:255'], 'last_name' => ['required', 'string', 'max:255'], 'email' => ['required', 'string', 'email', 'max:255', 'unique:invitations', 'unique:users'], ]; } }