Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ARC-Support
public projects
lou-server
Commits
22d07a7e
Commit
22d07a7e
authored
Jun 15, 2021
by
Maik Messerschmidt
Browse files
Don't send result data to index view.
parent
720e735a
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/ResultController.php
View file @
22d07a7e
...
...
@@ -16,21 +16,38 @@ use Zip;
class
ResultController
extends
Controller
{
/**
* Fields provided to the index view.
*
* Needed to avoid including the 'data' field, which can get very large.
*/
private
rowsForIndex
=
[
"id"
,
"experiment"
,
"created_at"
,
"ip"
,
"session_id"
,
];
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public
function
index
()
{
return
view
(
'results.index'
,
[
'results'
=>
Result
::
where
(
'partial'
,
false
)
->
get
(),
]);
$results
=
Result
::
select
(
$this
->
rowsForIndex
)
->
where
(
'partial'
,
false
)
->
get
();
return
view
(
'results.index'
,
[
'results'
=>
$results
]);
}
public
function
indexPartial
()
{
return
view
(
'results.index'
,
[
'results'
=>
Result
::
where
(
'partial'
,
true
)
->
get
(),
]);
$results
=
Result
::
select
(
$this
->
rowsForIndex
)
->
where
(
'partial'
,
true
)
->
get
();
return
view
(
'results.index'
,
[
'results'
=>
$results
]);
}
/**
...
...
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