Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Learning and Work
managing-money-api
Commits
4abce408
Commit
4abce408
authored
Jun 27, 2018
by
Jack Stupple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow update of currency_id
parent
ccf14471
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
app/Http/Controllers/Api/PlayerController.php
app/Http/Controllers/Api/PlayerController.php
+2
-0
No files found.
app/Http/Controllers/Api/PlayerController.php
View file @
4abce408
...
...
@@ -47,6 +47,7 @@ class PlayerController extends Controller
$this
->
validate
(
$request
,
[
'character_id'
=>
'nullable|numeric|exists:characters,id'
,
'language_id'
=>
'nullable|numeric|exists:languages,id'
,
'currency_id'
=>
'nullable|numeric|exists:currencies,id'
,
'budget_intro_completed'
=>
'nullable'
,
'calendar_intro_completed'
=>
'nullable'
]);
...
...
@@ -70,6 +71,7 @@ class PlayerController extends Controller
$previous_character
=
$player
->
character_id
;
$player
->
character_id
=
$request
->
input
(
'character_id'
,
$player
->
character_id
);
$player
->
language_id
=
$request
->
input
(
'language_id'
,
$player
->
language_id
);
$player
->
currency_id
=
$request
->
input
(
'currency_id'
,
$player
->
currency_id
);
$player
->
budget_intro_completed
=
$budget_intro_completed
;
$player
->
calendar_intro_completed
=
$calendar_intro_completed
;
$player
->
user_agent
=
json_encode
(
$request
->
input
(
'user_agent'
,
json_decode
(
$player
->
user_agent
)));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment