public dash and view counting
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?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'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user