tries to add api requests
This commit is contained in:
parent
e841c38573
commit
73c32b4fb6
26 changed files with 962 additions and 39 deletions
31
app/Http/Requests/ApiLoginRequest.php
Normal file
31
app/Http/Requests/ApiLoginRequest.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ApiLoginRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
$rules = [
|
||||
'email' => ['required', 'email', 'max:255'],
|
||||
'password' => ['required', 'min:8'],
|
||||
];
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue