Skip to content

Commit ef2efb0

Browse files
committed
User_model configuration.
1 parent 93cb620 commit ef2efb0

File tree

3 files changed

+3
-17
lines changed

3 files changed

+3
-17
lines changed

config/config.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
'password_reset_url' => env('FRONTEND_APP_URL').'/password/reset?token={token}&email={email}',
4848

4949
'user_verify_url' => env('FRONTEND_APP_URL').'/verify/{id}/{emailHash}',
50+
51+
'user_model' => \Illuminate\Foundation\Auth\User::class,
5052
],
5153

5254
/*

src/Http/Requests/RestifyRegisterRequest.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,9 @@
77

88
class RestifyRegisterRequest extends FormRequest
99
{
10-
/**
11-
* Determine if the user is authorized to make this request.
12-
*
13-
* @return bool
14-
*/
15-
public function authorize()
16-
{
17-
return true;
18-
}
19-
20-
/**
21-
* Get the validation rules that apply to the request.
22-
*
23-
* @return array
24-
*/
2510
public function rules()
2611
{
2712
return [
28-
'name' => 'required',
2913
'email' => 'required|email|max:255|unique:'.Config::get('config.auth.table', 'users'),
3014
'password' => 'required|confirmed|min:6',
3115
];

src/Services/AuthService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function broker()
8888
*/
8989
public function userQuery()
9090
{
91-
$userClass = Config::get('auth.providers.users.model');
91+
$userClass = Config::get('restify.auth.user_model');
9292

9393
try {
9494
$container = Container::getInstance();

0 commit comments

Comments
 (0)