mirror of
https://github.com/robonen/education-project.git
synced 2026-03-20 02:44:31 +00:00
auth
This commit is contained in:
@@ -16,7 +16,8 @@ class RegisterRequest extends UserRequest
|
||||
{
|
||||
return [
|
||||
'role' => 'required|string',
|
||||
'class_id' => 'required|integer|gt:0',
|
||||
'class_id' => 'integer|gt:0',
|
||||
'login' => 'required|unique:users'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ abstract class UserRequest extends ApiFormRequest
|
||||
public function rules()
|
||||
{
|
||||
return array_merge([
|
||||
'login' => 'required|string',
|
||||
'password' => 'required|string|min:6',
|
||||
], $this->specific());
|
||||
}
|
||||
|
||||
22
app/Http/Requests/ChatLinkRequest.php
Normal file
22
app/Http/Requests/ChatLinkRequest.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ChatLinkRequest extends ApiFormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name' => 'required',
|
||||
'link' => 'required',
|
||||
'class_id' => 'required|integer|gt:0',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user