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
fce268f1
Commit
fce268f1
authored
Jun 27, 2018
by
Jack Stupple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
answers get modifiers for the selected currency
parent
033d2ac9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
app/Answer.php
app/Answer.php
+4
-1
No files found.
app/Answer.php
View file @
fce268f1
...
...
@@ -19,7 +19,10 @@ class Answer extends Model
public
function
modifiers
()
{
return
$this
->
hasMany
(
\
App\Modifier
::
class
,
'model_id'
)
->
where
(
'model'
,
'='
,
'answer'
);
$selected_currency
=
Player
::
select
(
'currency_id'
)
->
where
(
'session_id'
,
'='
,
$_SERVER
[
'HTTP_SESSION_ID'
])
->
firstOrFail
();
return
$this
->
hasMany
(
\
App\Modifier
::
class
,
'model_id'
)
->
where
(
'model'
,
'='
,
'answer'
)
->
where
(
'currency_id'
,
'='
,
$selected_currency
);
}
public
function
resourceCategories
()
...
...
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