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
192d1d1b
Commit
192d1d1b
authored
Aug 20, 2018
by
Jack Stupple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
match the correct currency for base modifiers
parent
07192616
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/Character.php
app/Character.php
+2
-2
No files found.
app/Character.php
View file @
192d1d1b
...
...
@@ -19,10 +19,10 @@ class Character extends Model
{
$player
=
Player
::
where
(
'session_id'
,
'='
,
$_SERVER
[
'HTTP_SESSION_ID'
])
->
first
();
if
(
$player
->
currency_id
)
{
if
(
$player
->
language
)
{
return
$this
->
hasMany
(
Modifier
::
class
,
'model_id'
)
->
where
(
'model'
,
'='
,
'character'
)
->
where
(
'currency_id'
,
'='
,
$player
->
currency_id
);
->
where
(
'currency_id'
,
'='
,
$player
->
language
->
currency_id
);
}
else
{
$default_currency
=
Currency
::
where
(
'currency_code'
,
'EUR'
)
->
firstOrFail
();
return
$this
->
hasMany
(
Modifier
::
class
,
'model_id'
)
...
...
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