mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-23 19:50:40 -05:00
(Update) Controller + Commands Query Syntax
- using shorter and more readable syntax
- remove “=“ in where clauses
- uses oldest() / latest() instead of like orderBy('created_at', 'DESC')
This commit is contained in:
@@ -25,7 +25,7 @@ class WarningController extends Controller
|
||||
public function getWarnings()
|
||||
{
|
||||
$warnings = Warning::with(['torrenttitle', 'warneduser'])->latest()->paginate(25);
|
||||
$warningcount = Warning::where('active', '=', 1)->count();
|
||||
$warningcount = Warning::where('active', 1)->count();
|
||||
|
||||
return view('Staff.warnings.index', ['warnings' => $warnings, 'warningcount' => $warningcount]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user