Skip to content
Snippets Groups Projects
Commit ba5b6796 authored by a.croix's avatar a.croix
Browse files

Correction in displayed order in pagination

parent 90319162
No related branches found
No related tags found
No related merge requests found
Pipeline #6777 passed
......@@ -9,7 +9,7 @@ use Illuminate\Http\Request;
class WowaController extends Controller
{
const ITEM_BY_PAGE = 25;
const ITEMS_PER_PAGE = 25;
public function __construct()
{
// Uncomment to require authentication
......@@ -40,7 +40,7 @@ class WowaController extends Controller
*/
public function index()
{
return view("wowa.index", ["wowas" => Wowa::paginate(self::ITEM_BY_PAGE)]);
return view("wowa.index", ["wowas" => Wowa::orderBy('id', 'desc')->paginate(self::ITEMS_PER_PAGE)]);
}
/**
......
......@@ -20,7 +20,7 @@
<th>Progression (%)</th>
<th></th>
</tr>
@foreach($wowas->reverse() as $wowa)
@foreach($wowas as $wowa)
<tr>
<td>{{ $wowa->id }}</td>
<td>{{ $wowa->user_id}}</td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment