Пример #1
0
 /**
  * Show homepage view
  *
  * @return \Illuminate\View\View
  */
 public function index()
 {
     $worst = Shame::orderBy(DB::raw('COUNT("id")'), 'DESC')->groupBy('number_plate_id')->take(3)->lists('number_plate_id')->toArray();
     $plates = NumberPlate::whereIn('id', $worst)->lists('reg')->toArray();
     return view('home')->withPlates($plates);
 }
Пример #2
0
 public function plate($plate)
 {
     $plate = $this->parseReg($plate);
     $numberPlate = NumberPlate::whereReg($plate)->first();
     return view('plate')->withPlate($plate)->withNumberplate($numberPlate);
 }