@ -66,7 +66,7 @@ class QuestionsController extends BaseController
public function index(): Response
{
$questions = $this->question
->orderBy('answer')
->orderBy('answered_at')
->orderByDesc('created_at')
->get();
$this->cleanupModelNullValues($questions);
@ -63,7 +63,8 @@ class QuestionsController extends BaseController
->whereUserId($this->auth->user()->id)
->orderByDesc('answered_at')
->orderBy('created_at')
@ -35,7 +35,7 @@ class QuestionsControllerTest extends ControllerTest
$this->assertEquals('pages/questions/overview.twig', $view);
$this->assertArrayHasKey('questions', $data);
$this->assertEquals('Lorem?', $data['questions'][0]->text);
$this->assertEquals('Foo?', $data['questions'][0]->text);
return $this->response;
});