Пример #1
0
 public function getIndex()
 {
     $summary = (object) ['newUser' => User::where('state', '=', 'register')->orWhere('state', '=', 'auth')->count(), 'breakBike' => Bike::where('state', '=', 'repairing')->orWhere('state', '=', 'repaired')->orWhere('state', '=', 'broken')->count(), 'disabledUser' => User::where('state', '=', 'disabled')->count(), 'userCount' => User::count(), 'validUser' => User::where('total', '>=', 300)->count(), 'stopCount' => Stop::count(), 'rentingUser' => User::where('state', '=', 'rented')->count(), 'rentTimes' => Rent::where('type', '=', 'rent')->count(), 'returnTimes' => Rent::where('type', '=', 'return')->count(), 'bikeCount' => Bike::count(), 'adminCount' => User::where('auth', '>', 0)->count()];
     return view('admin.index')->withSummary($summary)->withUser($this->user);
 }