datatable.directory codebase https://datatable.directory/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
datatable.directory/app/Http/Controllers/DashController.php

24 lines
496 B

<?php
namespace App\Http\Controllers;
use App\Models\Table;
use App\Models\User;
class DashController extends Controller
{
public function view()
{
$users = User::orderBy('updated_at', 'desc')
->paginate(15, ['id', 'title', 'name'], 'pageu');
// TODO visit counting
$tables = Table::forList()
->orderBy('visits', 'desc')
->paginate(10, ['*'], 'paget');
return view('welcome', compact('users', 'tables'));
}
}