Skip to content

Commit

Permalink
user setting form request missing docs issue #46 updated
Browse files Browse the repository at this point in the history
  • Loading branch information
hafijul233 committed Jul 31, 2022
1 parent 6556473 commit e0a9785
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Http/Requests/Backend/Setting/UserSettingRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,15 @@ public function rules(): array
}


/**
* this function is used for so that any user can't change their role
* when a request attempt this method will overwrite request data with existing user roles
* @return void
*/
protected function prepareForValidation()
{

$targetUser = User::find($this->id);

/**
* @var User $requestUser
*/
Expand Down

0 comments on commit e0a9785

Please sign in to comment.